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