Skip to main content
Version: 11.x

Function: createServerSideHelpers()

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:81

Create functions you can use for server-side rendering / static generation

Type Parameters

Type Parameter
TRouter extends AnyRouter

Parameters

ParameterType
optsCreateServerSideHelpersOptions<TRouter>

Returns

ProtectedIntersection<{ dehydrate: (opts?) => DehydratedState; queryClient: QueryClient; }, DecoratedProcedureSSGRecord<TRouter["_def"]["_config"]["$types"], TRouter["_def"]["record"]>>

See

https://trpc.io/docs/v11/client/nextjs/server-side-helpers