TanStackT
TanStack3y ago
2 replies
popular-magenta

Accessing onError, onSettled in the component the mutation was called

I am making a mutation where if there is an error, I want to change something in the component where the mutation was called. How can I access this error state in the component? I want to show a message in the component that there was an error (instead of a snackbar)
Was this page helpful?