React Hook to show if window is focused or not
npm install use-window-focusReact Hook to show if window is focused or not
``sh`
pnpm add use-window-focus
`jsx
import useWindowFocus from 'use-window-focus';
export const App = () => {
const isWindowFocused = useWindowFocus();
return (
The package is available as open source under the terms of the MIT License.