fix: async for parity
This commit is contained in:
parent
754646d4a1
commit
780fa433e1
|
@ -21,7 +21,9 @@ const localStorageEnhancer = (createStore) => (reducer, initialState, enhancer)
|
||||||
// Hydrate.
|
// Hydrate.
|
||||||
const storage = JSON.parse(window.localStorage.getItem('@flecks/redux/state'));
|
const storage = JSON.parse(window.localStorage.getItem('@flecks/redux/state'));
|
||||||
if (storage) {
|
if (storage) {
|
||||||
|
setTimeout(() => {
|
||||||
store.dispatch(hydrateLocalStorage(storage));
|
store.dispatch(hydrateLocalStorage(storage));
|
||||||
|
}, 0);
|
||||||
}
|
}
|
||||||
// Subscribes to changes.
|
// Subscribes to changes.
|
||||||
store.subscribe(
|
store.subscribe(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user