Skip to content
Discussion options

You must be logged in to vote

no way I could provide one with SSR set up

we have a next-js ssr example in the docs?

to answer the question: we only dehydrate the state of the query, not it's options:

https://github.com/tannerlinsley/react-query/blob/19861272f57da5e587bce5bff449d0c3020243e0/src/core/hydration.ts#L60-L66

what I would do is to set the defaults in the QueryClient, or via setQueryDefaults, or directly on the useQuery on the client rather than on the server.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@kostia1st
Comment options

@TkDodo
Comment options

@sneakyfildy
Comment options

Answer selected by kostia1st
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
Converted from issue

This discussion was converted from issue #3213 on January 21, 2022 12:28.