redux-falsy
v1.0.0
Published
Drop falsy values that have been dispatched into redux
Downloads
12
Readme
redux-falsy
Drop falsy values that have been dispatched into redux. This may be a candidate for the simplest redux middleware possible.
Installation
$ npm install redux-falsy
Usage
All it does is drop falsy actions from continuing into your middleware stack. This is useful in environments where you are using the return values of things as your actions, as in vdux. The source code of this module is all the documentation you should need:
function falsy () {
return next => action => action && next(action)
}
Put it at the top of your middleware stack to avoid them getting into any of your middlewares.
License
MIT