1"use strict";(self.webpackChunkwww=self.webpackChunkwww||[]).push([["35175"],{4625(e,t,r){r.r(t),r.d(t,{metadata:()=>n,default:()=>u,frontMatter:()=>a,contentTitle:()=>o,toc:()=>i,assets:()=>d});var n=JSON.parse('{"id":"typedoc/tanstack-react-query/functions/createTRPCContext","title":"Function: createTRPCContext()","description":"createTRPCContext\\\\(): CreateTRPCContextResult\\\\","source":"@site/docs/typedoc/tanstack-react-query/functions/createTRPCContext.md","sourceDirName":"typedoc/tanstack-react-query/functions","slug":"/typedoc/tanstack-react-query/functions/createTRPCContext","permalink":"/docs/typedoc/tanstack-react-query/functions/createTRPCContext","draft":false,"unlisted":false,"editUrl":"https://github.com/trpc/trpc/tree/main/www/docs/typedoc/tanstack-react-query/functions/createTRPCContext.md","tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"@trpc/tanstack-react-query","permalink":"/docs/typedoc/tanstack-react-query/"},"next":{"title":"Function: createTRPCOptionsProxy()","permalink":"/docs/typedoc/tanstack-react-query/functions/createTRPCOptionsProxy"}}'),c=r(27968),s=r(77334);let a={},o="Function: createTRPCContext()",d={},i=[{value:"Type Parameters",id:"type-parameters",level:2},{value:"Returns",id:"returns",level:2},{value:"See",id:"see",level:2}];function l(e){let t={a:"a",blockquote:"blockquote",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(t.header,{children:(0,c.jsx)(t.h1,{id:"function-createtrpccontext",children:"Function: createTRPCContext()"})}),"\n",(0,c.jsxs)(t.blockquote,{children:["\n",(0,c.jsxs)(t.p,{children:[(0,c.jsx)(t.strong,{children:"createTRPCContext"}),"<",(0,c.jsx)(t.code,{children:"TRouter"}),", ",(0,c.jsx)(t.code,{children:"TFeatureFlags"}),">(): ",(0,c.jsx)(t.code,{children:"CreateTRPCContextResult"}),"<",(0,c.jsx)(t.code,{children:"TRouter"}),", ",(0,c.jsx)(t.code,{children:"TFeatureFlags"}),">"]}),"\n"]}),"\n",(0,c.jsxs)(t.p,{children:["Defined in: ",(0,c.jsx)(t.a,{href:"https://github.com/trpc/trpc/blob/f55eeb408e824a0443a78904644b7a5981644779/packages/tanstack-react-query/src/internals/Context.tsx#L38",children:"tanstack-react-query/src/internals/Context.tsx:38"})]}),"\n",(0,c.jsx)(t.p,{children:"Create a set of type-safe provider-consumers"}),"\n",(0,c.jsx)(t.h2,{id:"type-parameters",children:"Type Parameters"}),"\n",(0,c.jsxs)(t.table,{children:[(0,c.jsx)(t.thead,{children:(0,c.jsxs)(t.tr,{children:[(0,c.jsx)(t.th,{children:"Type Parameter"}),(0,c.jsx)(t.th,{children:"Default type"})]})}),(0,c.jsxs)(t.tbody,{children:[(0,c.jsxs)(t.tr,{children:[(0,c.jsxs)(t.td,{children:[(0,c.jsx)(t.code,{children:"TRouter"})," ",(0,c.jsx)(t.em,{children:"extends"})," ",(0,c.jsx)(t.code,{children:"AnyRouter"})]}),(0,c.jsx)(t.td,{children:"-"})]}),(0,c.jsxs)(t.tr,{children:[(0,c.jsxs)(t.td,{children:[(0,c.jsx)(t.code,{children:"TFeatureFlags"})," ",(0,c.jsx)(t.em,{children:"extends"})," ",(0,c.jsx)(t.a,{href:"/docs/typedoc/tanstack-react-query/type-aliases/FeatureFlags",children:(0,c.jsx)(t.code,{children:"FeatureFlags"})})]}),(0,c.jsx)(t.td,{children:(0,c.jsx)(t.code,{children:"object"})})]})]})]}),"\n",(0,c.jsx)(t.h2,{id:"returns",children:"Returns"}),"\n",(0,c.jsxs)(t.p,{children:[(0,c.jsx)(t.code,{children:"CreateTRPCContextResult"}),"<",(0,c.jsx)(t.code,{children:"TRouter"}),", ",(0,c.jsx)(t.code,{children:"TFeatureFlags"}),">"]}),"\n",(0,c.jsx)(t.h2,{id:"see",children:"See"}),"\n",(0,c.jsx)(t.p,{children:(0,c.jsx)(t.a,{href:"https://trpc.io/docs/client/tanstack-react-query/setup#3a-setup-the-trpc-context-provider",children:"https://trpc.io/docs/client/tanstack-react-query/setup#3a-setup-the-trpc-context-provider"})})]})}function u(e={}){let{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,c.jsx)(t,{...e,children:(0,c.jsx)(l,{...e})}):l(e)}},77334(e,t,r){r.d(t,{R:()=>a,x:()=>o});var n=r(64700);let c={},s=n.createContext(c);function a(e){let t=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:a(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.