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

Method isActive

packages/query-core/src/query.ts:471–475  ·  view source on GitHub ↗

* Returns `true` if the query has at least one observer for which `enabled` * does not resolve to `false`. * @returns `true` if the query has an enabled observer.

()

Source from the content-addressed store, hash-verified

469 * @returns `true` if the query has an enabled observer.
470 */
471 isActive(): boolean {
472 return this.observers.some(
473 (observer) => resolveQueryValue(observer.options.enabled, this) !== false,
474 )
475 }
476
477 /**
478 * Returns `true` if the query is disabled, meaning it will not fetch

Callers 2

isDisabledMethod · 0.95
matchQueryFunction · 0.80

Calls 1

resolveQueryValueFunction · 0.90

Tested by

no test coverage detected