useWindowSize
Keeps track of the dimensions of the browser window.
Installation
npm i @raddix/use-window-size
Usage
Basic Usage
API
Returns
The useWindowSize hook returns an object with the following properties:
| Return value | Description | Type | 
|---|---|---|
| width | The current width of the window, in pixels. | number | 
| height | The current height of the window, in pixels. | number |