Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 243 Bytes

README.md

File metadata and controls

7 lines (5 loc) · 243 Bytes

React viewport size hook

A hook which returns the dimensions of the viewport (window inner height and width). This hook uses the requestAnimationFrame function to throttle updates.

const { height, width } = useViewportSize();