Skip to content
public-library›Rules›TanStack Query›Read mutation state from other components with useMutationState

Read mutation state from other components with useMutationState

When a component other than the one calling useMutation needs a mutation's status or pending variables, give the mutation a mutationKey and read it with useMutationState.

In the full rule