Skip to content
Discussion options

You must be logged in to vote

the persistors are build upon hydration, and it accepts dehydrateOptions, so:

persistQueryClient({ queryClient, persistor, dehydrateOptions })

dehydrateOptions accept a shouldDehydrateQuery: (query: Query) => boolean function, where you can decide which query should be persisted, and which should not.

per default, this is implemented as: query.state.status === 'success' to avoid persisting loading or erroneous queries.

Replies: 3 comments 9 replies

Comment options

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

@koengommers
Comment options

@TkDodo
Comment options

@koengommers
Comment options

@maddyahmad
Comment options

Answer selected by acentfrio
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
7 participants