Skip to content

API Reference / @gtkx/navigation / useIsFocused

Function: useIsFocused()

useIsFocused(): boolean

Defined in: node_modules/.pnpm/@react-navigation+core@7.21.13_patch_hash=6462da01ed23beee88f01d290d3714743e43d2fd84235198fcbe09501a61d1d4_react@19.2.8/node_modules/@react-navigation/core/lib/typescript/src/useIsFocused.d.ts:8

Hook to get the current focus state of the screen. Returns a true if screen is focused, otherwise false. This can be used if a component needs to render something based on the focus state.

Returns

boolean

Released under the MPL-2.0 License.