T
TanStack3y ago
genetic-orange

How should one access queryclient in subcomponents?

Is there build in method to access the already created queryclient I have created and passed on root level to QueryClientProvider? if so, simple docs link is fine as I couldn't find method for that. I assume otherwise I just need to create my own react context? V4
2 Replies
flat-fuchsia
flat-fuchsia3y ago
useQuery, useMutation, etc will use the queryClient that you created and passed on to the <QueryClientProvider>
genetic-orange
genetic-orangeOP3y ago
Yeah, but i was looking for this as i wanted to access invalidation func down the tree and I couldn’t find hook for that ah, useQueryClient is what i was looking for

Did you find this page helpful?