redux-ignore icon indicating copy to clipboard operation
redux-ignore copied to clipboard

reducers will receive an empty action when filterActions was invoked

Open cicada1993 opened this issue 6 years ago • 0 comments

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 image

cicada1993 avatar Jul 19 '18 10:07 cicada1993