query.invalidate()
#9099
Unanswered
axelrindle
asked this question in
Ideas
Replies: 2 comments 7 replies
-
I like this idea, too. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I don't fully understand the use-case. When the query is active (which it sounds like it is), invalidate will also refetch it so why not use refetch instead? |
Beta Was this translation helpful? Give feedback.
7 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.
-
We already have
query.refetch()
, why not addquery.invalidate()
?I have a scenario where a generic DataTable component accepts a
UseQueryDefinedReturnType
as a prop. There is a refetch button which callsquery.refetch()
. In some situations I'd like the DataTable to also invalidate the query, which is not possible, because the DataTable has no knowledge of the queries query key.Beta Was this translation helpful? Give feedback.
All reactions