MCPcopy Create free account
hub / github.com/TanStack/query / #onUpdate

Method #onUpdate

packages/query-core/src/queriesObserver.ts:298–304  ·  view source on GitHub ↗
(observer: QueryObserver, result: QueryObserverResult)

Source from the content-addressed store, hash-verified

296 }
297
298 #onUpdate(observer: QueryObserver, result: QueryObserverResult): void {
299 const index = this.#observers.indexOf(observer)
300 if (index !== -1) {
301 this.#result = replaceAt(this.#result, index, result)
302 this.#notify()
303 }
304 }
305
306 #notify(): void {
307 if (this.hasListeners()) {

Callers 2

onSubscribeMethod · 0.95
setQueriesMethod · 0.95

Calls 2

#notifyMethod · 0.95
replaceAtFunction · 0.85

Tested by

no test coverage detected