Byteclaw / visage

Visage design system
https://visage.design
MIT License
12 stars 3 forks source link

Detect breakpoint using matchMedia on initial render and not in effect #632

Closed michalkvasnicak closed 4 years ago

michalkvasnicak commented 4 years ago

Basically we want to detect current breakpoint sooner than useEffect but we want to unregister listeners on unmount.