TanStackT
TanStack2y ago
4 replies
ordinary-sapphire

Prefetching, client side hydration and updating parameters

In my page.tsx I am using prefetchQuery to grab some data from an API. I am then wrapping a client side component within a hydration boundary as per the documentation.

Within the client side component, I have a
useQuery
call to hydrate the pre-fetched data.

This works fine. Data is loaded instantly when the page renders. Great.

The problem I have is that when I update paramers, such as pageIndex or pageSize from Tanstack Table, the fetch of new data is performed from page.tsx. I expected it would perform subsequent calls from the client component. Is this understanding correct?

If so, how would one approach this?

Below is some excerpts of code. I have only included the relevant parts for brevity.

Thank you for your time and guidance.
Was this page helpful?