Skip to main content
Version: 11.x

Function: withTRPC()

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

Type Parameters

Type ParameterDefault type
TRouter extends AnyRouter-
TSSRContext extends NextPageContextNextPageContext

Parameters

ParameterType
optsWithTRPCNoSSROptions<TRouter> | WithTRPCSSROptions<TRouter>

Returns

Function

Parameters

ParameterType
AppOrPageNextComponentType<any, any, any>

Returns

NextComponentType

Defined in

withTRPC.tsx:86