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

Method isFocused

packages/query-core/src/focusManager.ts:74–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72 }
73
74 isFocused(): boolean {
75 if (typeof this.#focused === 'boolean') {
76 return this.#focused
77 }
78
79 // document global can be unavailable in react native
80 // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
81 return globalThis.document?.visibilityState !== 'hidden'
82 }
83}
84
85export const focusManager = new FocusManager()

Callers 4

onFocusMethod · 0.95
canContinueFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected