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
):
const store = ;
Note: batchStoreEnhancer
overwrites dispatch and subscribe on the original redux store, and thus must be applied before any middleware or store enhancers that depend on these two methods.
Example Usage
;