tRPCttRPC
Powered by
josephbranchJ
tRPC•3y ago•
7 replies
josephbranch

How can you fetch data on a dynamic router with trpc?

I’m creating a table component within my NextJs app. Instead of making an api call in the parent component and passing the data to the table through props I’d like the component to be able to manage its own state. How can I achieve this in trpc v10?

In v9 I believe you could do
const helloNoArgs = trpc.useQuery(['hello']
const helloNoArgs = trpc.useQuery(['hello']


What’s the equivalent, if there is one, in v10?
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

How can I make a direct fetch on a router endpoint from TRPC in NextJS on client?
PieterPPieter / ❓-help
3y ago
tRPC with app router
SzymonSSzymon / ❓-help
3y ago
How do *you* structure the tRPC router when dealing with isolated components?
Michael SchaufelbergerMMichael Schaufelberger / ❓-help
13mo ago
dynamic router creation
patrickPpatrick / ❓-help
4y ago