Basic usage involves adding persistReducer and persistStore to your setup. Every app needs to decide how many levels of state they want to "merge". The default is 1 level. If you are using react, wrap your root component with PersistGate. This delays the rendering of your app's UI until your persisted state has been retrieved and saved to redux. State reconcilers define how incoming state is merged in with initial state. It is critical to choose the right state reconciler for your state. Redux persist ships with react integration as a convenience. The PersistGate component is the recommended way to delay rendering until persistence is complete. It works in one of two modes. Loading prop, the provided loading value will be rendered until persistence is complete at which point children will be rendered. And function children, the function will be invoked with a single bootstrapped argument. When bootstrapped is true, persistence is complete and it is safe to render the full app.
Features
- Support for immutable reducers
- Support for seamless-immutable reducers
- Compress your serialized state with lz-string
- Encrypt your serialized state with AES
- Store or load a subset of your state with support for immutablejs
- More flexible alternative to expire transformer above with more options