MCPcopy
hub / github.com/TanStack/query / #onUpdate

Method #onUpdate

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

Source from the content-addressed store, hash-verified

261 }
262
263 #onUpdate(observer: QueryObserver, result: QueryObserverResult): void {
264 const index = this.#observers.indexOf(observer)
265 if (index !== -1) {
266 this.#result = replaceAt(this.#result, index, result)
267 this.#notify()
268 }
269 }
270
271 #notify(): void {
272 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