Skip to main content
Version: 11.x

Interface: TRPCContextProps<TRouter, TSSRContext>

Extends

Extended by

Type Parameters

Type Parameter
TRouter extends AnyRouter
TSSRContext

Properties

abortOnUnmount?

optional abortOnUnmount: boolean

Deprecated

pass abortOnUnmount to createTRPCReact instead Abort loading query calls when unmounting a component - usually when navigating to a new page

Default

ts
false
ts
false

Inherited from

TRPCContextPropsBase.abortOnUnmount

Defined in

packages/react-query/src/internals/context.tsx:97


client

client: TRPCUntypedClient<TRouter>

The TRPCClient

Inherited from

TRPCContextPropsBase.client

Defined in

packages/react-query/src/internals/context.tsx:77


queryClient

queryClient: QueryClient

The react-query QueryClient

Defined in

packages/react-query/src/internals/context.tsx:115


ssrContext?

optional ssrContext: null | TSSRContext

The SSR context when server-side rendering

Default

ts
null
ts
null

Inherited from

TRPCContextPropsBase.ssrContext

Defined in

packages/react-query/src/internals/context.tsx:82


ssrState?

optional ssrState: SSRState

State of SSR hydration.

  • false if not using SSR.
  • prepass when doing a prepass to fetch queries' data
  • mounting before TRPCProvider has been rendered on the client
  • mounted when the TRPCProvider has been rendered on the client

Default

ts
false
ts
false

Inherited from

TRPCContextPropsBase.ssrState

Defined in

packages/react-query/src/internals/context.tsx:91