0.1.1 • Published 9 years ago

redux-skip-by-action v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

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.