Skip to content
Discussion options

You must be logged in to vote

Hi 👋

No, there's no way to achieve this. The callbacks passed to useMutation will always fire before the callbacks passed to mutate. Be aware that there are also situations in which callbacks passed to mutate might not fire at all.

Please see: https://tkdodo.eu/blog/mastering-mutations-in-react-query#some-callbacks-might-not-fire

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@louis-young
Comment options

Answer selected by louis-young
Comment options

You must be logged in to vote
1 reply
@TkDodo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants