useWindowSize
Tracks window
size which updates on window resize.
- @param
options
- Configurable options - @returns An object containing size information
Example
const { innerWidth, innerHeight } = useWindowSize(ref)
if (!innerWidth) return null
return <div>{innerWidth} x {innerHeight}</div>