Skip to content

what am i misunderstanding about persisting the cache? #5867

Answered by TkDodo
dadamssg asked this question in Q&A
Discussion options

You must be logged in to vote

@dadamssg I think this is the solution I would prefer:

https://codesandbox.io/p/sandbox/vigorous-wildflower-7khqlw?embed=1&file=/src/index.jsx:59,2

The idea is to create the router inside the react component (in state, not memo), but in a child component that will only be rendered below the PersistGate.

Replies: 6 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@TkDodo
Comment options

@dadamssg
Comment options

@dadamssg
Comment options

@dadamssg
Comment options

@dadamssg
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by dadamssg
Comment options

You must be logged in to vote
1 reply
@TkDodo
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants