initialData vs hydration, for SSR is always better hydration approach?
I have read these documentation:
https://tanstack.com/query/v4/docs/react/guides/ssr#using-initialdata
and https://tanstack.com/query/v4/docs/react/guides/ssr#using-hydration.
For what I can understand the hydration method have more adventages that the initialData approach right?
So I think will always be better use that ?
Or maybe have some others downsides that don't specify the documentation?
I just want to know when is better use one or the other...
SSR | TanStack Query Docs
React Query supports two ways of prefetching data on the server and passing that to the queryClient.
Prefetch the data yourself and pass it in as initialData
0 Replies