Does Mutation stay in isLoading state till invalidateQuery or refetch query is completed with the return Promise #6875
Unanswered
nabanita-sarkar
asked this question in
Q&A
Replies: 1 comment 1 reply
-
yes
please do |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
From @TkDodo 's blog - Mastering Mutations in React Query
What I am inferring from above is that, the
isLoading
orisPending
of the mutation will remain true until both the mutation and the invalidated query with query key['posts', id, 'comments']
is completed. Am I correct to infer that?Please let me know if this was changed in any recent version or this can't be done when use custom hooks for mutation, because I am unable to recreate this behaviour. (I can share a minimal reproduction if needed)
Thanking in advance. Thanks for this library and all the hard work.
Beta Was this translation helpful? Give feedback.
All reactions