query icon indicating copy to clipboard operation
query copied to clipboard

Hydration failed because the server rendered HTML didn't match the client.

Open yWilliamLima opened this issue 1 year ago • 1 comments

Describe the bug

Hydration error and I notice that when opening the page it makes two queries on the server-side and one of them returns the outdated value even in production

Your minimal, reproducible example

https://stackblitz.com/~/github.com/yWilliamLima/test-error

Steps to reproduce

Probably just refreshing (F5) the page should cause the error

Expected behavior

That the error does not occur, because I am doing the prefetchQuery on the server-side and using the useSuspenseQuery on the client-side

How often does this bug happen?

Often

Screenshots or Videos

Image

Platform

Windows 11 Google Chrome

Tanstack Query adapter

None

TanStack Query version

5.66.5

TypeScript version

^5

Additional context

No response

yWilliamLima avatar Feb 17 '25 22:02 yWilliamLima

@juliusmarminge found the solution

yWilliamLima avatar Feb 17 '25 22:02 yWilliamLima