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

Method trackProp

packages/query-core/src/queryObserver.ts:362–364  ·  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

360 * @param key - The name of the property that was read.
361 */
362 trackProp(key: keyof QueryObserverResult) {
363 this.#trackedProps.add(key)
364 }
365
366 /**
367 * 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