Skip to content

v1.4.0

Compare
Choose a tag to compare
@zalmoxisus zalmoxisus released this 23 May 18:28
· 577 commits to master since this release

Filter what to send to the extension's monitor

Added the following parameters:

  • actionsFilter (function) - function which takes action object and id number as arguments, and should return action object back. See the example bellow.
  • statesFilter (function) - function which takes state object and index as arguments, and should return state object back.

Example of usage:

const actionsFilter = (action) => (
  action.type === 'FILE_DOWNLOAD_SUCCESS' && action.data ?
  { ...action, data: '<<LONG_BLOB>>' } : action
);

const store = createStore(rootReducer, window.devToolsExtension && window.devToolsExtension({
  actionsFilter,
  statesFilter: (state) => state.data ? { ...state, data: '<<LONG_BLOB>>' } : state)
}));

Also you can filter whole actions by specifying actionsBlacklist or actionsWhitelist parameter.