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

Method destroy

packages/query-core/src/queriesObserver.ts:110–115  ·  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

108 * underlying `QueryObserver` this observer manages.
109 */
110 destroy(): void {
111 this.listeners = new Set()
112 this.#observers.forEach((observer) => {
113 observer.destroy()
114 })
115 }
116
117 /**
118 * 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