1.0.0 • Published 8 years ago
redux-freeze-state v1.0.0
Installation
Use freezeState with your reducer to find spots in your app where you are mutating state. It is not recommended to use this in production as it recursively freezes objects and could affect performance.
import { createStore } from 'redux';
import freezeState from 'redux-freeze-state';
let reducer = ...
let store = createStore(freezeState(reducer));
Modifying store state will result in an error:
Unhandled promise rejection TypeError: Can't add property test, object is not extensible(…)
1.0.0
8 years ago