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

Method onUnsubscribe

packages/query-core/src/queryObserver.ts:124–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122 }
123
124 protected onUnsubscribe(): void {
125 if (!this.hasListeners()) {
126 this.destroy()
127 }
128 }
129
130 /**
131 * Returns whether the observed query is currently stale and configured

Callers

nothing calls this directly

Calls 2

destroyMethod · 0.95
hasListenersMethod · 0.80

Tested by

no test coverage detected