Skip to content

UseMutation's onSuccess handler vs. the mutationFn #9521

Closed Answered by TkDodo
jennings asked this question in Q&A
Discussion options

You must be logged in to vote

slight difference is that onSuccess runs after the global cache level callbacks, so if one of those throws, the onSuccess handler of useMutation isn’t called anymore.

Replies: 1 comment 1 reply

Comment options

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

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