Sean Cassiere
Sean Cassiere
Explore posts from servers
TtRPC
Created by Sean Cassiere on 5/8/2023 in #❓-help
Using Response with the Next App Router
The route handlers in the App Router, only receive the Request object, requiring you to use a Response to set stuff onto the response like status, cookies, etc. Previously, we were able to pipe the req and res into the context. My question is: what's the new practice for returning data AND setting the status (or cookies) when within a tRPC router (that's nested using the fetch adapter) in the new Next App Router?
5 replies