Function: unstable_createHydrateClient()
On this page
unstable_createHydrateClient(
_queryClient):FC<unstable_HydrateClientProps>
Defined in: tanstack-react-query/src/internals/HydrateClient.tsx:22
Create a HydrateClient server component for the request's QueryClient.
It sends the queries started so far in this request to the browser,
pending ones as promises that stream in as they settle. A query an earlier
HydrateClient already sent is skipped, so nesting them is fine.
React Server Components only: the package resolves to the server build
through the react-server export condition.
Parameters
| Parameter | Type |
|---|---|
_queryClient | QueryClient | () => QueryClient |
Returns
FC<unstable_HydrateClientProps>
See
https://trpc.io/docs/client/tanstack-react-query/handles#hydrate-client