redux-skip-by-action
v0.1.1
Published
redux store enhancer that allows skipping subscriber notifications by action metadata
Downloads
6
Maintainers
Readme
This repository is not considered best practices for Redux - for a more appropriate solution to the problem, see redux-batched-actions
redux-skip-by-action
Store enhancer for redux that enables skipping subscriber notifications for individual actions.
npm install --save redux-skip-by-action
Usage
import {createStore, compose} from 'redux';
import skipByAction, {skip} from 'redux-skip-by-action';
const store = compose(skipByAction)(createStore)(reducer, intialState);
// note: skip adds FSA-compliant metadata to the action
store.dispatch(skip({type: SOME_ACTION, payload: somePayload}))
// the above is equivalent to
store.dispatch({type: SOME_ACTION, payload: somePayload, meta: {skip: true}})
Thanks
Thanks to Terry Appleby for redux-batched-subscribe.