useQuery in App Router?
I have a client component that I want to use useQuery in like in pages router, but only
query
is availableSolution:Jump to solution
where are you importing
api
from? You have to make sure you import it from /trpc/react.ts
3 Replies
Solution
where are you importing
api
from? You have to make sure you import it from /trpc/react.ts
ohhhhhh
thank you so much !
was importing from server
I'm trying to use "useQuery" in app directory, with help with this example:
https://github.com/trpc/examples-next-app-dir
, but it still now working !!
GitHub
GitHub - trpc/examples-next-app-dir
Contribute to trpc/examples-next-app-dir development by creating an account on GitHub.