You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs are still incredibly unclear on how to use tRPC with the nextjs app router, and there are no examples either.
There are some related issues (#5936, #5277), but I still don't understand the integration at all.
It also mentions react-query all over the place, but what if I don't want to use react-query?
I used tRPC a couple of years ago in a Nextjs pages router app and the setup was easy and simple, coming back now I don't understand anything anymore.
I think the reason this is unclear is because there isn't solid documentation explaining the integration points for each part of the integration. Take the following components of your typical tRPC implementation.
handler creator (when to use nextjs adapter handler fn vs fetch adapter handler fn) (pages vs app router)
fetching method (react-query, etc) (creating the client side and server side fetcher for rsc vs standard ssr)
authorization integration (would be cool to see how some of these integrate)
This issue has been locked because we are very unlikely to see comments on closed issues. If you are running into a similar issue, please create a new issue. Thank you.
Activity
KATT commentedon Oct 20, 2024
If you don't want to use React Query: https://trpc.io/blog/trpc-actions
terrierscript commentedon Oct 31, 2024
Finding the page below allowed me to do what I wanted.
https://trpc.io/docs/server/adapters/nextjs#route-handlers
This page proved to be the most beneficial for trying out the migration from the Pages router.
It might be helpful to include a link to it on the setup page to avoid any confusion
jblevins1991 commentedon May 17, 2025
I think the reason this is unclear is because there isn't solid documentation explaining the integration points for each part of the integration. Take the following components of your typical tRPC implementation.
KATT commentedon Nov 2, 2026
🤖 Addressed by #7193 and #7805: https://trpc.io/docs/client/nextjs/app-router-setup. The example is tracked in #6586. Closing.
github-actions commentedon Nov 3, 2026
This issue has been locked because we are very unlikely to see comments on closed issues. If you are running into a similar issue, please create a new issue. Thank you.