A port of the
redux-immutable-state-invariant middleware, customized for use with Redux Toolkit. Any detected mutations will be thrown as errors.
You can customize the behavior of this middleware by passing any of the supported options as the
immutableCheck value for
Creates an instance of the immutability check middleware, with the given options.
You will most likely not need to call this yourself, as
getDefaultMiddleware already does so.
Default implementation of the "is this value immutable?" check. Currently implemented as:
This will return true for primitive types (like numbers, strings, booleans, null and undefined)