HydrationBoundary fails to work when the layout itself is wrapped around HydrationBoundary component
Hey, I'm trying to wrap my head around this bug. I've a header that lists organizations and the prefetch for those organizations happens on a
So far so good, the organizations are hydrated correctly and no flickers shows up on the header.
But now I've a
But for some reason the
I can see that the
What I'm doing wrong? I'm guessing it's related to NextJS SSR?
layout.tsx:So far so good, the organizations are hydrated correctly and no flickers shows up on the header.
But now I've a
page.tsx for listing projects and I also would like to hydrate those projects:But for some reason the
<ProjectsPage> which is a client component doesn't hydrate correctly and thus the flickers shows up. I can see that the
useQuery data of said page is empty at first render and also the queryClient.getQueryCache().getAll() shows the query key but at a pending state which may show that the react-query didn't use the state from the page and it's trying to fetch up again.What I'm doing wrong? I'm guessing it's related to NextJS SSR?