MCPcopy Create free account
hub / github.com/TanStack/query / getDefaultState

Function getDefaultState

packages/query-core/src/mutation.ts:546–563  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

544 * @returns The initial mutation state.
545 */
546export function getDefaultState<
547 TData,
548 TError,
549 TVariables,
550 TOnMutateResult,
551>(): MutationState<TData, TError, TVariables, TOnMutateResult> {
552 return {
553 context: undefined,
554 data: undefined,
555 error: null,
556 failureCount: 0,
557 failureReason: null,
558 isPaused: false,
559 status: 'idle',
560 variables: undefined,
561 submittedAt: 0,
562 }
563}

Callers 2

#updateResultMethod · 0.90
constructorMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected