injectMutationState

Function: injectMutationState()

ts
function injectMutationState<TResult>(
  mutationStateOptionsFn,
  options?,
): Signal<TResult[]>
function injectMutationState<TResult>(
  mutationStateOptionsFn,
  options?,
): Signal<TResult[]>

Injects a signal that tracks the state of all mutations.

Type Parameters

TResult = MutationState<unknown, Error, unknown, unknown>

Parameters

mutationStateOptionsFn = ...

A function that returns mutation state options.

options?: InjectMutationStateOptions

The Angular injector to use.

Returns

Signal<TResult[]>

The signal that tracks the state of all mutations.

Defined in

inject-mutation-state.ts:53

Want to Skip the Docs?
Query.gg - The Official React Query Course
“This course is the best way to learn how to use React Query in real-world applications.”—Tanner Linsley
Get the course