Skip to main content
Version: 10.x

Function: withTRPC()

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

Type parameters

ParameterDefault
TRouter extends Router< AnyRouterDef< AnyRootConfig, any >, 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:96

Source

next/src/withTRPC.tsx:83


Generated using TypeDoc and typedoc-plugin-markdown