Function: ~~createServerSideHelpers()~~
On this page
createServerSideHelpers<
TRouter>(opts):ProtectedIntersection<{dehydrate: (opts?) =>DehydratedState;queryClient:QueryClient; },DecoratedProcedureSSGRecord<TRouter["_def"]["_config"]["$types"],TRouter["_def"]["record"]>>
Defined in: packages/react-query/src/server/ssgProxy.ts:99
Creates helpers that fetch or prefetch queries on the server, for server-side rendering and static generation.
Type Parameters
| Type Parameter |
|---|
TRouter extends AnyRouter |
Parameters
| Parameter | Type |
|---|---|
opts | CreateServerSideHelpersOptions<TRouter> |
Returns
ProtectedIntersection<{ dehydrate: (opts?) => DehydratedState; queryClient: QueryClient; }, DecoratedProcedureSSGRecord<TRouter["_def"]["_config"]["$types"], TRouter["_def"]["record"]>>
Deprecated
@trpc/react-query only gets bug fixes and will be removed in
the next major version. Use @trpc/tanstack-react-query instead.