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

Method onUnsubscribe

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

Source from the content-addressed store, hash-verified

125 }
126
127 protected override onUnsubscribe(): void {
128 if (!this.hasListeners()) {
129 this.destroy()
130 }
131 }
132
133 /**
134 * 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