I searched this group for a good way to sense when screen orientation changes between portrait and landscape (assuming a mobile environment). I found some good solutions, but these were older posts.
It turns out that now, Screen.onResize is an actual event, though it hasn't made the docs. (I think this went in last year at some point.)
So on that event, you just check whether Screen.width is greater or less than Screen.height to figure out which orientation is active. Works perfectly in Framer and on the device.
Yeah that should be added to the docs Koen / Jonas / Benjamin Den Boer
Thanks! I'll add it to our list of undocumented API!