redux-ignore
redux-ignore copied to clipboard
reducers will receive an empty action when filterActions was invoked
following is an filter function
import { filterActions } from 'redux-ignore'
const filter = (reducer, moduleName) => {
console.log(moduleName)
const reg = new RegExp(`^${moduleName}`)
return filterActions(reducer, action => action && action.type && action.type.match(reg))
}
module.exports = filter
following is log