useWindowSize
Get the current window dimensions reactively.
Width
px
Height
px
Usage Example
1import { useWindowSize } from '@danixsoft/hooks';
2
3function Dimensions() {
4 const { width, height } = useWindowSize();
5
6 return (
7 <div>
8 Window is {width}px by {height}px
9 </div>
10 );
11}