Grifn
Grifn
TtRPC
Created by Grifn on 7/17/2023 in #❓-help
Next.js app router catch-all HTTP methods
The app router already supports the catch-all file for route resolution, but AFAIK still expects separately method exports like export function GET(). I think this means we can't provide the tRPC NextApiHandler from the app router and we still need to use the pages directory (not a big deal but adding a whole extra directory just for the tRPC route currently). Any way to provide the tRPC Next handler from the app router?
4 replies
TtRPC
Created by Grifn on 7/10/2023 in #❓-help
tRPC + App directory + SSR - current state?
What is the current state of the technologies working together with or without SSR? It looks like some work is/was being done around using tRPC with the new app directory but its hard to tell if that work is completed or what is currently supported or recommended. Can I start a new Next.js project with the new app directory and tRPC and expect to be able to utilize SSR for the RSC (React Server Components)? What problems currently exist? If tRPC requests can't be handled during SSR at this point, can the RSC still render on the server but the tRPC query begin on the client on mount? What is the current best way to use tRPC with the new app directory that best utilizes all of the new RSC features?
11 replies