useMutation 'invalidates' field #7324
Unanswered
UltimateGG
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
From the docs:
With the removal of the onSuccess hook, something for QOL could be implemented:
Where if the mutation succeeds, the query keys in the invalidates array are refetched automatically.
Not sure if this breaks any react query methodology but just a suggestion that could save some lines as its a very common pattern.
Beta Was this translation helpful? Give feedback.
All reactions