Skip to content

API Reference / @gtkx/navigation / useIsFocused

Function: useIsFocused() ​

useIsFocused(): boolean

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