How do I pass down the inferred type returned from tRPC data via react props?
I have a react app with tRPC. I am doing a query to fetch data of objects. But the child component <UserCard> does not have the type of the object in .map and the parent does . Can I pass down the type of the prop somehow so I can put it in the interface of IProps?


3 Replies
GitHub
create-t3-app/api.ts at next · t3-oss/create-t3-app
The best way to start a full-stack, typesafe Next.js app - create-t3-app/api.ts at next · t3-oss/create-t3-app
but basically
RouterOutputs[router][op1][op2][op3]
thanks it worked