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

Project Samples

Project Activity

See All Activity >

Categories

Storage

License

MIT License

Follow Redux Persist

Redux Persist Web Site

You Might Also Like
Find out just how much your login box can do for your customer | Auth0 Icon
Find out just how much your login box can do for your customer | Auth0

With over 53 social login options, you can fast-track the signup and login experience for users.

From improving customer experience through seamless sign-on to making MFA as easy as a click of a button – your login box must find the right balance between user convenience, privacy and security.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Redux Persist!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Storage Software

Registered

2021-05-24