Invalidating query from a different component #1911
Unanswered
MarekBaraniecki
asked this question in
Q&A
Replies: 1 comment 4 replies
-
as long as they are both under the same
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have one component, let's call it View where i use the useQuery hook. Then in a separate component, higher up in the tree, let's say Sidebar I'm using the useQueryClient hook in order to (on some user action) invalidate queries. However, the query list of that QueryClient is empty. I can work with my query only through a QueryClient instantiated in the very same component. Is that expected behavior?
Beta Was this translation helpful? Give feedback.
All reactions