T
TanStack14mo ago
conscious-sapphire

Why I can't see the prefetching data info on devtools

I prefetched on root layout using prefetchQuery which wrapper the children with hydrationBoundry but I'm not seeing on devtool that the prefetch is triggered
// layout.tsx
const queryClient = new QueryClient()
await queryClient.prefetchQuery({
queryKey: ["id", planId],
queryFn: () => getDocs(planId),
})

<HydrationBoundary state={dehydrate(queryClient)}>
{children}
</HydrationBoundary>
// layout.tsx
const queryClient = new QueryClient()
await queryClient.prefetchQuery({
queryKey: ["id", planId],
queryFn: () => getDocs(planId),
})

<HydrationBoundary state={dehydrate(queryClient)}>
{children}
</HydrationBoundary>
1 Reply
fascinating-indigo
fascinating-indigo14mo ago
I am having the same problem

Did you find this page helpful?