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

Method #onUpdate

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

Source from the content-addressed store, hash-verified

398 }
399
400 #onUpdate(observer: QueryObserver, result: QueryObserverResult): void {
401 const index = this.#observers.indexOf(observer)
402 if (index !== -1) {
403 this.#result = this.#result.slice()
404 this.#result[index] = result
405 this.#notify()
406 }
407 }
408
409 #notify(): void {
410 if (this.hasListeners()) {

Callers 1

#subscribeToMethod · 0.95

Calls 1

#notifyMethod · 0.95

Tested by

no test coverage detected