Issues with actions being fired before rehydrate is completed
See original GitHub issueHello,
I’m having some issues with actions being fired before the rehydrate is done. I’ve also tried using an action buffer which shows the actions being fired after the rehydrate but they’re fired using the initial state and not the rehydrated state.
My code currently looks as follows for the middlewares, store and persistStore:
const middlewares = applyMiddleware(
thunk,
routerMiddleware(browserHistory),
createActionBuffer(REHYDRATE)
)
export const store = createStore(
rootReducer,
compose(
autoRehydrate(),
middlewares,
)
)
persistStore(store, {
keyPrefix: 'key',
blacklist: ['items'],
debounce: 500
})
I’m probably overlooking something simple but I’ve been stuck on this for a few days now so any help or insights are greatly appreciated!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:17 (3 by maintainers)
Top Results From Across the Web
Redux persist rehydrate previous auth state too late
Set a breakpoint in the render method and verify that it's not being called until the rehydrate action has fired. If it's rendering...
Read more >What You Need to Know About Termination of Employment
An overview of termination of employment practices and common issues.
Read more >Blob rehydration from the Archive tier | Microsoft Learn
Rehydrating a blob from the Archive tier can take several hours to complete. Microsoft recommends archiving larger blobs for optimal ...
Read more >Reasons Employees Can Get Fired - The Balance
Damaging company property is a fireable offense. Whether intentional or not, if your actions lead to damage of the company's property or ...
Read more >Low Income Home Energy Assistance Program (LIHEAP)
FY 2020 LIHEAP Heating Program Community Action Agencies Contact List ... the risk of health and safety problems such as illness, fire, or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
May be you need something as this: https://github.com/rt2zz/redux-persist/blob/master/docs/recipes.md#delay-render-until-rehydration-complete
I successfully use this method to show kind of “splash screen” until initial loading done.
Thanks this worked for me https://github.com/rt2zz/redux-persist/blob/master/docs/recipes.md#delay-render-until-rehydration-complete