Custom hook that tracks the size of the window.
import { useWindowSize } from "@teasim/hooks";
export default function Component() {
const { width = 0, height = 0 } = useWindowSize();
return (
<div>
The current window dimensions are: <code>{JSON.stringify({ width, height })}</code>
</div>
);
}