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

Method bindMethods

packages/query-core/src/queryObserver.ts:109–111  ·  view source on GitHub ↗

* Binds the methods of the result (`refetch`) to the observer, so they keep working when destructured * from it. Subclasses override it to bind their own result methods as well.

()

Source from the content-addressed store, hash-verified

107 * from it. Subclasses override it to bind their own result methods as well.
108 */
109 protected bindMethods(): void {
110 this.refetch = this.refetch.bind(this)
111 }
112
113 protected override onSubscribe(): void {
114 if (this.listeners.size === 1) {

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected