useQuery
together with prefetch on Next.js SSR
#3080
-
Hi team, Currently I'm using If I load the application and navigate to a page where you have the prefetch on the server side and a My question is, should I be handling this behavior differently or is this double request is desirable? To me it seems redundant and I actually don't know exactly the best approach to take. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
are you prefetching the query with
|
Beta Was this translation helpful? Give feedback.
are you prefetching the query with
queryClient.prefetchQuery
and then use hydration? If so, I think you are just experiencing what's described here:https://react-query.tanstack.com/guides/ssr#staleness-is-measured-from-when-the-query-was-fetched-on-the-server