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

Method onSubscribe

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

Source from the content-addressed store, hash-verified

129 }
130
131 protected override onSubscribe(): void {
132 if (this.listeners.size === 1 && this.#currentMutation) {
133 this.#currentMutation.addObserver(this)
134
135 this.#updateResult()
136 }
137 }
138
139 protected override onUnsubscribe(): void {
140 if (!this.hasListeners()) {

Callers

nothing calls this directly

Calls 2

#updateResultMethod · 0.95
addObserverMethod · 0.45

Tested by

no test coverage detected