Skip to main content
Version: 11.x

Function: withTRPC()

withTRPC<TRouter, TSSRContext>(opts): (AppOrPage) => NextComponentType

Type parameters

ParameterDefault
TRouter extends Router< AnyRouterDef< AnyRootConfig >, TRouter >-
TSSRContext extends NextPageContextNextPageContext

Parameters

ParameterType
optsWithTRPCNoSSROptions< TRouter > | WithTRPCSSROptions< TRouter >

Returns

(AppOrPage): NextComponentType

Parameters

ParameterType
AppOrPageNextComponentType< any, any, any >

Returns

NextComponentType

Source

next/src/withTRPC.tsx:89

Source

next/src/withTRPC.tsx:76


Generated using TypeDoc and typedoc-plugin-markdown