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

Method onUnsubscribe

packages/query-core/src/mutationObserver.ts:139–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

137 }
138
139 protected override onUnsubscribe(): void {
140 if (!this.hasListeners()) {
141 this.#currentMutation?.removeObserver(this)
142 }
143 }
144
145 /**
146 * Updates the observer's result when the observed mutation changes, and notifies its listeners.

Callers

nothing calls this directly

Calls 2

hasListenersMethod · 0.80
removeObserverMethod · 0.45

Tested by

no test coverage detected