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"`] > >

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

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

Type parameters

Parameter
TRouter extends Router< any, any, TRouter >

Parameters

ParameterType
optsCreateServerSideHelpersOptions< TRouter >

Returns

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

Source

packages/react-query/src/server/ssgProxy.ts:134


Generated using TypeDoc and typedoc-plugin-markdown