3 ms·
>complex flexbox layouting, theming, and animations The only way to implement those things in an immediate mode framework is to cache a lot of state. I haven't
by throwaway82652 5y ago
>complex flexbox layouting, theming, and animations
The only way to implement those things in an immediate mode framework is to cache a lot of state. I haven't found this to be any easier, once the layout becomes complex enough the amount of information that needs to be cached approaches what it would be in retained mode. Because of this I've also found the performance of immediate mode to be very bad. Especially when it involves:
- large pieces of reflowing text (this means no text editors or word processors)
- very large datasets in list/tree/column/grid widgets (this means no database editors or spreadsheets)
- something like a flexbox, css grid or a constraint-solver based layout (this means no responsive layouts)
These are all nice things that don't fit well with those patterns. Without any caching or keying it's functionally equivalent to having a React layout that diffs the entire tree before every redraw.
The main use cases for immediate mode appears to only be quick prototyping, and making debugging tools for games and simulators. That's not bad by any means, but I've never seen one that is able to efficiently do complex layouts with large datasets.