usePageFocus
Track whether the browser window has focus.
usePageFocus.tsx
import { usePageFocus } from "@cermuel/hooks/react";export function usePageFocusExample() { const focused = usePageFocus(); return <p>{focused ? "Focused" : "Blurred"}</p>;}Props
Param
Type
Default Value
No props for this hook
Returns
boolean