useWindowSize ​
Hook that manages a window size
typescript
import { useWindowSize } from '@elysiumorg/solid-use';
Usage ​
typescript
const size = useWindowSize();
Demo ​
Api ​
Parameters
Name | Type | Default | Note |
---|---|---|---|
params.initialWidth? | number | Number.POSITIVE_INFINITY | The initial window width |
params.initialHeight? | number | Number.POSITIVE_INFINITY | The initial window height |