How to use persistQueryClient in Tanstack Start
Hi, I have been trying to find documentation on using the
persistQueryClient in my Tanstack React Start App, but so far have not been able to get it working
For example, consider the Basic + React Query example at https://tanstack.com/start/latest/docs/framework/react/examples/start-basic-react-query
How do you exactly integrate this with PersistQueryClientProvider at https://tanstack.com/query/latest/docs/framework/react/plugins/persistQueryClient#persistqueryclientprovider
So far, I'm stuck since I don't understand how the queryClient is declared in the router.tsx file in TSS especially with that ssr integration.
Any help would be appreciated!React TanStack Start Start Basic React Query Example | TanStack Sta...
An example showing how to implement Start Basic React Query in React using TanStack Start.
2 Replies
helpful-purpleOP•3mo ago
I have found this: https://discord.com/channels/719702312431386674/1353951645255602288
eager-peach•3mo ago
you can wrap your own provider by passing it to the
Wrap property on the createTanStackRouter call.
i think you also set wrap: false on setupRouterSsrQueryIntegration