New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Provide examples using tRPC with Next.js app router #5277
Comments
Seconding this! It's been hard to find any authoritative sources on TRPC usage with the App Router. |
Yes, please. I'm going crazy here trying to prefetch an infinite query and I'm not smart enough to figure it out myself. Anyone got some example code for how to get it to work? I've seen some examples where they use an server side helper, call prefetchInfinite, dehydrate the queryclient, then pass it to a HydrationBoundary. But yeah, can't get it to work. |
Hey @maryamkhan14, you can refer to this video https://www.youtube.com/watch?v=qCLV0Iaq9zU to set up trpc with Next.js App router, also you can go to my repositories and check the Pestile repo which is set up using Next.js app router with Trpc. |
This can help you and I will be writing a blog article by today This is minimalist example and very easy to understand https://github.com/Pavan-Rajesh/tRPC-Nextjs-App-Router-Minimal.git Some of the things in the above video are deprecated and some of the docs are also deprecated but vscode helped me ^-^ |
Bump. Also relates to #5625 I can find no explanation anywhere for how to cache trpc endpoints when using the NextJS App Router |
Area of Improvement
Only tRPC using page Router in Next.js are present in your documentation. Please Provide Examples for tRPC using Next.js app Router
Link to related docs
https://trpc.io/docs/client/nextjs/setup
Additional information
No response
👨👧👦 Contributing
Funding
The text was updated successfully, but these errors were encountered: