Vengeance
Vengeance13mo ago

useQuery in App Router?

I have a client component that I want to use useQuery in like in pages router, but only query is available
Solution:
where are you importing api from? You have to make sure you import it from /trpc/react.ts
Jump to solution
3 Replies
Solution
siobe
siobe13mo ago
where are you importing api from? You have to make sure you import it from /trpc/react.ts
Vengeance
VengeanceOP13mo ago
ohhhhhh thank you so much ! was importing from server
Amr Eraky
Amr Eraky12mo ago
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.