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

Method #onUpdate

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

Source from the content-addressed store, hash-verified

300 }
301
302 #onUpdate(observer: QueryObserver, result: QueryObserverResult): void {
303 const index = this.#observers.indexOf(observer)
304 if (index !== -1) {
305 this.#result = replaceAt(this.#result, index, result)
306 this.#notify()
307 }
308 }
309
310 #notify(): void {
311 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