Double hydration caused by double initial render with Next.js when using rewrites #3192
-
Hey! I was close to submit a GitHub issue, because I thought that RQ's hydration triggers a second initial render with Next.js. This causes massive problems for me, as I wanted to ask whether you think it would be valuable to add this to the "SSR caveats" section of the docs? And mabye one of you is already aware of this and has found a nice solution for React Query? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
sure, please update the docs. we have some proposals for changing hydration in v4, in preparation of react18. see: #3173 |
Beta Was this translation helpful? Give feedback.
-
Hmm, interesting case! A minimal codesandbox demonstrating the problem would help me understand, but I know that can be tricky to set up in this case. Why do Dates differ between the two hydrations? Queries shouldn't hydrate if there is already a query with newer or the same timestamp in the cache, as seen on these lines in the implementation, so maybe something else is going on here? |
Beta Was this translation helpful? Give feedback.
sure, please update the docs. we have some proposals for changing hydration in v4, in preparation of react18. see: #3173