MCPcopy Index your code
hub / github.com/TanStack/query / isFocused

Method isFocused

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

Source from the content-addressed store, hash-verified

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

Callers 4

onFocusMethod · 0.95
canContinueFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected