Skip to content

useWindowFocus ​

Category
Elements

Hook that provides the current focus state of the window

typescript
import { useWindowFocus } from '@siberiacancode/reactuse';

Usage ​

typescript
const focused = useWindowFocus();

Demo ​

Api ​

Returns

boolean

Contributors ​

Source • Demo