API reference > @kontsedal/olas-react > UseMutationCallbacks
UseMutationCallbacks type
Callbacks useMutation runs after a run settles. They fire from the React layer, not the controller: put cache work on the mutation's own hooks. A run that was aborted (superseded, reset or disposed) fires none of them, as the mutation's own hooks don't.
Signature:
typescript
type UseMutationCallbacks<V, R> = {
onSuccess?: (data: R, variables: V) => void;
onError?: (error: unknown, variables: V) => void;
onSettled?: (data: R | undefined, error: unknown | undefined, variables: V) => void;
};