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

Method destroy

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

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