Is there, say, an event I can hook up to, to detect a screen size change, so that I can make my elements responsively resize themselves?
I'm half-way there, in that I can retrieve the current size of my top-level element, through the UserInterface API:
UserInterface.measureLayoutRelativeToWindow(that).then(dimensions => {
// dimensions.width, dimensions.height
});
But this is just a one-off call. I now want to subscribe a handler that will get called whenever the "window" resizes. E.g. a desktop user resizes the browser window or a mobile user rotates the device 90°.
Does ReactXP have an API for this yet?