T
TanStack17mo ago
variable-lime

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
vicious-gold
vicious-gold16mo ago
I am having the same problem

Did you find this page helpful?