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

Method onSubscribe

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

Source from the content-addressed store, hash-verified

94 }
95
96 protected onSubscribe(): void {
97 if (this.listeners.size === 1 && this.#currentMutation) {
98 this.#currentMutation.addObserver(this)
99
100 this.#updateResult()
101 }
102 }
103
104 protected onUnsubscribe(): void {
105 if (!this.hasListeners()) {

Callers

nothing calls this directly

Calls 2

#updateResultMethod · 0.95
addObserverMethod · 0.45

Tested by

no test coverage detected