Redux Persist saves Redux state to storage as it changes and restores it when the app starts. It wraps your root reducer with minimal changes to existing Redux setup.
Overview
Redux Persist is a library that persists and rehydrates a Redux store. Application state is written to storage when it changes and loaded back into the store on startup, so user sessions and UI state can survive reloads and restarts.
Integration is drop-in: wrap the root reducer with persistReducer and create a persistor with persistStore. Redux Toolkit is supported without extra setup in current releases. Built-in storage engines include localStorage and sessionStorage; AsyncStorage, IndexedDB, filesystem backends, and community engines can be plugged in.
You control what gets saved using allowlists, denylists, nested persists, and transforms on serialize and deserialize. Versioned migrations upgrade stored state when shapes change. For React apps, PersistGate can delay rendering until rehydration finishes, or useRehydrated reports load status. Server rendering with Next.js is supported: nothing is stored on the server and state loads in the browser.
Recipes cover per-user state, tab sync, encryption transforms, hot module replacement, and safe logout resets inside the persisted reducer so data clears consistently.
Key features
- Automatic persist on state changes
- localStorage and sessionStorage built in
- Pluggable storage engines
- Allowlist, denylist, and nested persists
- State migrations between versions
- PersistGate for React rehydration
- Next.js server rendering support
- Transforms and encryption recipes
Use cases
- Surviving browser reloads
- Restoring cart or UI preferences
- React Native offline state
- Gradual rollout of store shape changes
- Per-user persisted settings