tRPCttRPC
Powered by
Sean CassiereS
tRPC•3y ago•
4 replies
Sean Cassiere

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
req
and
res
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?
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Next.js App router
BrianBBrian / ❓-help
8mo ago
Next 14 app router
Fitim BytyqiFFitim Bytyqi / ❓-help
2y ago
Questions around trpc with next.js app router
HobbsHHobbs / ❓-help
2y ago
Prefetch using Next App router not working with useQuery but works with useSuspenseQuery
Gabriel BeltrãoGGabriel Beltrão / ❓-help
15mo ago