Store enhancer for redux which allows listening of dispatched actions.
npm install --save redux-dispatch-subscribe
dispatchSubscribe store enhancer add a
addDispatchListener to your Redux store. The dispatch listener of called after regular store listeners.
dispatchSubscribe overloads the dispatch on the original redux store it is important that it gets applied before any other store enhancers or middleware that depend on these functions; The compose utility in redux can be used to handle this:
;;const enhancer =// Note: passing enhancer as the last argument to createStore requires redux@>=3.1.0const store = ;
compose applies functions from right to left,
dispatchSubscribe should appear at the end of the chain.
Implementation is inspired from redux-batched-subscribe.