Function: createTRPCOptionsProxy()
On this page
createTRPCOptionsProxy<
TRouter,TFeatureFlags>(opts):TRPCOptionsProxy<TRouter,TFeatureFlags>
Defined in: tanstack-react-query/src/internals/createOptionsProxy.ts:412
Creates the options proxy without React context. Works on the server too.
Type Parameters
| Type Parameter | Default type |
|---|---|
TRouter extends AnyRouter | - |
TFeatureFlags extends FeatureFlags | object |
Parameters
| Parameter | Type |
|---|---|
opts | TRPCOptionsProxyOptions<TRouter, TFeatureFlags> |
Returns
TRPCOptionsProxy<TRouter, TFeatureFlags>
Example
export const trpc = createTRPCOptionsProxy<AppRouter>({
client: trpcClient,
queryClient,
});