UNPKG

redux-code

Version:

Redux helpers for actions and reducers

17 lines (16 loc) 349 B
/** * * A special object to make an ability to skip actions. * This is only can be used with skipMiddleware */ export const SKIP = { type: null } export const skipMiddleware = function () { return function (next) { return function (action) { if (action === SKIP) { return action } return next(action) } } }