redux-persist
Advanced tools
Comparing version 5.6.5 to 5.6.6
{ | ||
"name": "redux-persist", | ||
"version": "5.6.5", | ||
"version": "5.6.6", | ||
"description": "persist and rehydrate redux stores", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -15,5 +15,11 @@ # Redux Persist | ||
#### Usage | ||
Basic implementation involves adding `persistReducer` and `persistStore` to your setup. **IMPORTANT** Every app needs to decide how many levels of state they want to "merge". The default is 1 level. Please read through the [state reconciler docs](#state-reconciler) for more information. | ||
Usage Examples: | ||
1. [Basic Usage](#basic-usage) | ||
2. [Nested Persists](#nested-persists) | ||
3. [Hot Module Replacement](./docs/hot-module-replacement.md) | ||
4. Code Splitting [coming soon] | ||
#### Basic Usage | ||
Basic usage involves adding `persistReducer` and `persistStore` to your setup. **IMPORTANT** Every app needs to decide how many levels of state they want to "merge". The default is 1 level. Please read through the [state reconciler docs](#state-reconciler) for more information. | ||
```js | ||
@@ -146,4 +152,4 @@ // configureStore.js | ||
#### Nested Blacklist / Whitelist | ||
The blacklist and whitelist only work one level deep. However persisted reducers can be nested.For example, if you want to blacklist `state.auth.somethingTemporary`: | ||
## Nested Persists | ||
Nested persist can be useful for a variety of reasons including different storage adapters, code splitting, or deep filtering. For example blacklist and whitelist only work one level deep, but we can use a nested persist to blacklist a deep value: | ||
```js | ||
@@ -150,0 +156,0 @@ import { combineReducers } from 'redux' |
@@ -16,2 +16,10 @@ | ||
declare module "redux-persist/lib/storage" { | ||
export * from "redux-persist/es/storage"; | ||
} | ||
declare module "redux-persist/lib/storage/session" { | ||
export * from "redux-persist/es/storage/session"; | ||
} | ||
declare module "redux-persist/lib/constants" { | ||
@@ -18,0 +26,0 @@ export * from "redux-persist/es/constants"; |
200525
3003
236