redux-replicate-localforage
Replicator for redux-replicate
designed to locally persist the state of redux
stores using localforage
.
Table of contents
Installation
npm install redux-replicate-localforage --save
Usage
Use with redux-replicate
.
react-redux-provide
Example using // src/replication.js ;; themereplication = reducerKeys: 'themeName' replicator: localforage;
compose
Example using ;;;; const initialState = wow: 'such storage' very: 'cool'; const key = 'superCoolStorageUnit';const reducerKeys = true;const replicator = localforage;const replication = ;const create = createStore;const store = ;
Debouncing
By default, a debounce occurs when writing the next state to localforage (during onStateChange
). The default timeout is 10 milliseconds. You can change it by doing this:
; localforagedebounce = 20;