queryClient.invalidateQueries works with only one dependency #4034
Unanswered
LeonardoTrapani
asked this question in
Q&A
Replies: 1 comment 2 replies
-
simply put: invalidateQueries doesn't work like this. You have to pass one array in that might match multiple queries. For example, if you have 2 queries that are structure like:
you can call |
Beta Was this translation helpful? Give feedback.
2 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.
-
Hello! I'm using react query with react native. I was trying to invalidate some queries, but it didn't work. After some time I tried to invalidate only one of them and it worked. Is this normal behaviour? And if so why is this called invalidateQeries and not invalidateQuery?
QUERIES:
BOFORE (not working):
AFTER (working):
Beta Was this translation helpful? Give feedback.
All reactions