MCPcopy Create free account
hub / github.com/TanStack/query / trackProp

Method trackProp

packages/query-core/src/queryObserver.ts:363–365  ·  view source on GitHub ↗

* Records that the given `QueryObserverResult` property was read, so a subsequent update only * notifies this observer if a tracked property actually changed. Normally called indirectly via * QueryObserver#trackResult's proxy; exposed directly for adapters that track property * acce

(key: keyof QueryObserverResult)

Source from the content-addressed store, hash-verified

361 * @param key - The name of the property that was read.
362 */
363 trackProp(key: keyof QueryObserverResult) {
364 this.#trackedProps.add(key)
365 }
366
367 /**
368 * Returns the `Query` instance this observer is currently observing.

Callers 4

trackResultMethod · 0.95
trackResultMethod · 0.80
#trackResultMethod · 0.80

Calls 1

addMethod · 0.45

Tested by

no test coverage detected