v1.4.0
Filter what to send to the extension's monitor
Added the following parameters:
- actionsFilter (function) - function which takes
action
object andid
number as arguments, and should returnaction
object back. See the example bellow. - statesFilter (function) - function which takes
state
object andindex
as arguments, and should returnstate
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.