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

Method #onUpdate

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

Source from the content-addressed store, hash-verified

366 }
367
368 #onUpdate(observer: QueryObserver, result: QueryObserverResult): void {
369 const index = this.#observers.indexOf(observer)
370 if (index !== -1) {
371 this.#result = this.#result.slice()
372 this.#result[index] = result
373 this.#notify()
374 }
375 }
376
377 #notify(): void {
378 if (this.hasListeners()) {

Callers 2

onSubscribeMethod · 0.95
setQueriesMethod · 0.95

Calls 1

#notifyMethod · 0.95

Tested by

no test coverage detected