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

Method bindMethods

packages/query-core/src/mutationObserver.ts:78–81  ·  view source on GitHub ↗

* Binds the methods of the result (`mutate` and `reset`) to the observer, so they keep working when * destructured from it.

()

Source from the content-addressed store, hash-verified

76 * destructured from it.
77 */
78 protected bindMethods(): void {
79 this.mutate = this.mutate.bind(this)
80 this.reset = this.reset.bind(this)
81 }
82
83 /**
84 * Updates the observer's options.

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected