tRPCttRPC
Powered by
SansPapyrus683S
tRPC•3y ago•
13 replies
SansPapyrus683

`useQuery` not working?

is it just me or does
useQuery
useQuery
not work in my next js components?
i try to call it and it says client[procedure] is not a function
image.png
Solution
Only applies if you're using t3 with app router:

If you're trying to use API in a client component then API needs to be imported from /trpc/react

If you're using API in an rsc or anything on the server, you import from /trpc/server
Jump to solution
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

useQuery enabled not working???
taylor.prestoTtaylor.presto / ❓-help
4y ago
Cache not working for `useQuery`
JokcyJJokcy / ❓-help
3y ago
UseQuery iterator not working for me
balakayBbalakay / ❓-help
2y ago