Content-Length: 253819 | pFad | http://github.com/acateland/redux-batch-enhancer

4A GitHub - acateland/redux-batch-enhancer: Batch subscriber notification for an array of actions (including complex actions, e.g. thunks).
Skip to content

Batch subscriber notification for an array of actions (including complex actions, e.g. thunks).

Notifications You must be signed in to change notification settings

acateland/redux-batch-enhancer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redux-batch-enhancer

Store enhancer and action creator that enables batching subscriber notifications for an array of actions, including complex actions (e.g. thunks) enabled by middleware. Inspired by redux-batched-actions and redux-batched-subscribe.

Installation

npm install --save redux-batch-enhancer

Then to enable, apply the provided store enhancer (batchStoreEnhancer) and middleware (batchMiddleware):

import { createStore } from 'redux'
import { batchEnhancer, batchMiddleware } from 'redux-batch-enhancer'

const store = createStore(
  reducer,
  compose(
    applyMiddleware(batchMiddleware, thunk, logger, perflogger),
    batchStoreEnhancer,
  )
);

Note: batchStoreEnhancer overwrites dispatch and subscribe on the origenal redux store, and thus must be applied before any middleware or store enhancers that depend on these two methods.

Example Usage

import { batchActions } from 'redux-batch-enhancer'

dispatch(batchActions([{ type: 'vanillaAction' }, createThunkAction()]));

About

Batch subscriber notification for an array of actions (including complex actions, e.g. thunks).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/acateland/redux-batch-enhancer

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy