question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issues with actions being fired before rehydrate is completed

See original GitHub issue

Hello,

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:open
  • Created 7 years ago
  • Reactions:4
  • Comments:17 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
vovkasmcommented, Dec 6, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found