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

Method destroy

packages/query-core/src/queriesObserver.ts:114–119  ·  view source on GitHub ↗

* Stops observing all queries: clears all listeners and destroys every * underlying `QueryObserver` this observer manages.

()

Source from the content-addressed store, hash-verified

112 * underlying `QueryObserver` this observer manages.
113 */
114 destroy(): void {
115 this.listeners = new Set()
116 this.#observers.forEach((observer) => {
117 observer.destroy()
118 })
119 }
120
121 /**
122 * Replaces the set of queries being observed. Existing `QueryObserver`s

Callers 2

onUnsubscribeMethod · 0.95
setQueriesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected