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

Function getDefaultState

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

Source from the content-addressed store, hash-verified

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

Callers 2

#updateResultMethod · 0.90
constructorMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected