We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rehydrate gives error state.forEach is not a function
The text was updated successfully, but these errors were encountered:
I solved problem with this quick fix
import { getStoredState } from 'redux-persist-immutable'; export const crosstabSync = (persistor, config) => { config = config || {} let blacklist = config.blacklist || false; let whitelist = config.whitelist || false; const handleStorageEvent = (e) => { if(e.key.indexOf(KEY_PREFIX) === 0){ var keyspace = e.key.substr(KEY_PREFIX.length); if(whitelist && whitelist.indexOf(keyspace) === -1){ return } if(blacklist && blacklist.indexOf(keyspace) !== -1){ return } getStoredState(persistConfig, (err, state) => { var statePartial = {} statePartial[keyspace] = state[keyspace]; persistor.rehydrate(statePartial); }) } } window.addEventListener('storage', handleStorageEvent, false); }
I don't use auto autoRehydrate()
example of updating my session reducer
case 'persist/REHYDRATE': return state.merge(action.payload.session);
Sorry, something went wrong.
No branches or pull requests
rehydrate gives error state.forEach is not a function
The text was updated successfully, but these errors were encountered: