Skip to content
Discussion options

You must be logged in to vote

Mutations don't share state like Queries do. Whenever you mount a component, it gets a new instance of a Mutation. This makes sure you can trigger the same mutation multiple times.

So if you navigate away and back, useMutation is "fresh" and doesn't know anything about any mutation fired in the past.

You can use useMutationState to read the state of all mutations in the cache.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ZeroProger
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