EnsembleUI / ensemble-react

BSD 3-Clause "New" or "Revised" License
15 stars 1 forks source link

Support device object like flutter #676

Closed evshi closed 2 months ago

evshi commented 3 months ago

Is your feature request related to a problem? Please describe. The device object provides some utility to ensemble devs, react should support the same spec

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context https://docs.ensembleui.com/device-object#devicewidth-and-deviceheight

evshi commented 3 months ago

@sagardspeed2 please ensure that the device is implemented as an atom and properly triggers expressions on change.

Use the resizeObserver or mutationObserver API to achieve this.