![Álvaro Trigo 🐦🔥 on Twitter: "Uh wow 😲, I had no idea we could use: > window.matchMedia In order to trigger JavaScript events based on the viewport size! Sweeeeeet! 😊 https://t.co/nFDOKEvknp" / Álvaro Trigo 🐦🔥 on Twitter: "Uh wow 😲, I had no idea we could use: > window.matchMedia In order to trigger JavaScript events based on the viewport size! Sweeeeeet! 😊 https://t.co/nFDOKEvknp" /](https://pbs.twimg.com/media/EeAmXRRWkAEqHTo.png)
Álvaro Trigo 🐦🔥 on Twitter: "Uh wow 😲, I had no idea we could use: > window.matchMedia In order to trigger JavaScript events based on the viewport size! Sweeeeeet! 😊 https://t.co/nFDOKEvknp" /
![Using window.matchMedia in React. Spoiler: Safari makes it messy | by Bethany Drake | Better Programming Using window.matchMedia in React. Spoiler: Safari makes it messy | by Bethany Drake | Better Programming](https://miro.medium.com/v2/resize:fit:1200/1*1wfirAP3QRzydAd43ZEjBw.jpeg)
Using window.matchMedia in React. Spoiler: Safari makes it messy | by Bethany Drake | Better Programming
css-contain] Similar to window.matchMedia(), Container Queries should have a similar method · Issue #6205 · w3c/csswg-drafts · GitHub
![Álvaro Trigo 🐦🔥 on Twitter: "Uh wow 😲, I had no idea we could use: > window.matchMedia In order to trigger JavaScript events based on the viewport size! Sweeeeeet! 😊 https://t.co/nFDOKEvknp" / Álvaro Trigo 🐦🔥 on Twitter: "Uh wow 😲, I had no idea we could use: > window.matchMedia In order to trigger JavaScript events based on the viewport size! Sweeeeeet! 😊 https://t.co/nFDOKEvknp" /](https://pbs.twimg.com/media/EeAoUrjWkAAB09o.png)