App dir + tRPC +
Hi, I am setting up a project with [create-t3-app@7.13.2-beta.ca0b017 + /app + tRPC (v10.27.1) + @tanstack/react-query (v5.0.0-alpha.58)], and I had a few questions about how this all works with the app directory.
I saw that with the /pages directory, you would use the hoc trpc.withTRPC, a <trpc.Provider client={...}>, and a <QueryClientProvider client={...}> to pass the tRPC to the rest of the app, but in my project I see a trpc/client.ts which seems to create a similar client to above but uses experimental_createTRPCNextAppDirClient.
Firstly, how do client calls to tRPC work without setting up any context (unless I'm missing something) and what is experimental_createTRPCNextAppDirClient doing?
Secondly, I'm just curious about how I setup react query with this whole setup.
Apologies if this has already been answered or if I'm missing something obvious (I've tried reading a lot of documentation for tRPC and React Query but I couldn't find much useful for the app dir and figured I'd come here), thanks!
I saw that with the /pages directory, you would use the hoc trpc.withTRPC, a <trpc.Provider client={...}>, and a <QueryClientProvider client={...}> to pass the tRPC to the rest of the app, but in my project I see a trpc/client.ts which seems to create a similar client to above but uses experimental_createTRPCNextAppDirClient.
Firstly, how do client calls to tRPC work without setting up any context (unless I'm missing something) and what is experimental_createTRPCNextAppDirClient doing?
Secondly, I'm just curious about how I setup react query with this whole setup.
Apologies if this has already been answered or if I'm missing something obvious (I've tried reading a lot of documentation for tRPC and React Query but I couldn't find much useful for the app dir and figured I'd come here), thanks!