tRPCttRPC
Powered by
Nacho EliasN
tRPC•4y ago•
70 replies
Nacho Elias

useQueryClient is not working as expected

So before v10 I was simply using useQueryClient and had my
queryClient
queryClient
strongly typed. Now I moved to v10 and for some reason, the documentation says that the queryClient was removed from the context so I should use the useQueryClient hook directly from
@tanstack
@tanstack
but if I do so then the queryClient returned by that hook is not the queryClient
trpc
trpc
is using, it's just empty. I made it work by using the
trpc.useContext
trpc.useContext
hook coming from my client utils but I definitely think that the docs are a bit f*cked up.
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?
Next page

Similar Threads

Inferring Types not working as expected
MladenMMladen / ❓-help
10mo ago
useUtils vs useQueryClient
RealityShiftRRealityShift / ❓-help
3y ago
Streaming is not working
omgwotOomgwot / ❓-help
2y ago