v0.4.7
New options to sanitize states and actions:
stateSanitizer
- function which takes state object and index as arguments, and should return state object back.actionSanitizer
- function which takes action object and id number as arguments, and should return action object back.
Example of usage:
export default function configureStore(initialState) {
// Note: passing enhancer as last argument requires redux@>=3.1.0
const store = createStore(
rootReducer,
initialState,
devTools({
actionSanitizer: (action) => (
action.type === 'FILE_DOWNLOAD_SUCCESS' && action.data ?
{ ...action, data: '<<LONG_BLOB>>' } : action
),
stateSanitizer: (state) => state.data ? { ...state, data: '<<LONG_BLOB>>' } : state
})
);
return store;
}