Skip to content

useWindowFocus ​

Hook that provides the current focus state of the window

elements
test coverage
Last changed: last month

Installation ​

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

Usage ​

typescript
const focused = useWindowFocus();

Demo ​

Api ​

Returns

boolean

Source ​

Source • Demo

Contributors ​

D
debabin
debabin

Released under the MIT License.