Vengeance
Vengeance14mo 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
siobe14mo ago
where are you importing api from? You have to make sure you import it from /trpc/react.ts
Vengeance
VengeanceOP14mo ago
ohhhhhh thank you so much ! was importing from server
Amr Eraky
Amr Eraky13mo 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.