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

Method #onUpdate

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

Source from the content-addressed store, hash-verified

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

Callers 2

onSubscribeMethod · 0.95
setQueriesMethod · 0.95

Calls 1

#notifyMethod · 0.95

Tested by

no test coverage detected