NextJS App Routers with tRPC: can't call query on server component
Hi all,
I'm folloing this guidline to setup nextjs with tRPC but it didn't work when I call the query on server componet:
https://trpc.io/docs/client/react/server-components#getting-data-in-a-server-component
The query wasn't show up when I call: await trpc.hello.query()
Is there any config that I missed?
Thanks!!
Set up with React Server Components | tRPC
This guide is an overview of how one may use tRPC with a React Server Components (RSC) framework such as Next.js App Router.
2 Replies
Here is the codes and package version I used