reduxImmutableStateInvariant is the function that must be called before passing it to applyMiddleware.
const store = createStore(rootReducer, initialState, compose(
applyMiddleware(reduxImmutableStateInvariant()),
window.devToolsExtension ? window.devToolsExtension() : f => f
)
);
Where is it in the docs?
github README docs ( require) reduxImmutableStateInvariant. . :
const middleware = process.env.NODE_ENV !== 'production' ?
[require('redux-immutable-state-invariant')(), thunk] :
[thunk];
const store = createStore(
reducer,
applyMiddleware(...middleware)
);
thunk ?
thunk thunk .
const thunk = createThunkMiddleware();
thunk.withExtraArgument = createThunkMiddleware;
export default thunk;
, ---?
, , (isImmutable), , . , isImmutable - , .
export default function immutableStateInvariantMiddleware(isImmutable = isImmutableDefault) {
https://github.com/leoasis/redux-immutable-state-invariant/blob/5ed542246e32b7eec06879b25e5a0a478daf4892/src/trackForMutations.js#L5