John Suh pfp
John Suh
@suh
Does anyone know how to do hydrate / dehydrate properly on next.js SSR with react query?
1 reply
0 recast
0 reaction

‍‍ pfp
‍‍
@git
Using Pages or App Directory in Next.js?
1 reply
0 recast
1 reaction

John Suh pfp
John Suh
@suh
Pages. Following their example on their docs but it simply doesn't work
1 reply
0 recast
0 reaction

‍‍ pfp
‍‍
@git
Can you share repro or code link?
1 reply
0 recast
0 reaction

John Suh pfp
John Suh
@suh
Figured out the issue. The useQuery on the client side was making an unnecessary query despite being hydrated with the same query key because staleTime is set to 0 by default on next.js
1 reply
0 recast
1 reaction

John Suh pfp
John Suh
@suh
imo terrible default assumption with SSR - the hydrated value should be assumed to be good
0 reply
0 recast
0 reaction