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

Method reset

packages/query-core/src/mutationObserver.ts:127–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

125 }
126
127 reset(): void {
128 // reset needs to remove the observer from the mutation because there is no way to "get it back"
129 // another mutate call will yield a new mutation!
130 this.#currentMutation?.removeObserver(this)
131 this.#currentMutation = undefined
132 this.#updateResult()
133 this.#notify()
134 }
135
136 mutate(
137 variables: TVariables,

Callers 1

setOptionsMethod · 0.95

Calls 3

#updateResultMethod · 0.95
#notifyMethod · 0.95
removeObserverMethod · 0.45

Tested by

no test coverage detected