<GridLayout> VS <FlexboxLayout> Round 1 Fight!


If a UI problem can be solved with either <GridLayout> or <FlexboxLayout> which should be chosen from an efficiency point of view? Does one perform better than the other? What about other considerations? I often get confused on which to choose.


I may not be 100% accurate, but I think GridLayout and FlexboxLayout are the two most efficient layout containers. As far as the difference between them - I’m not sure. I think it depends on the complexity of the other elements/layout containers…so Grid can get less efficient the more complicated its children are.


Grid and Flex are my favorite too, I would use Grid when the number of columns / rows are known & minimal, and the space has to be divided evenly or may be fixed.

Flex is the choice when number of rows / columns are not known / too many to define. Most useful when designing layout that fits for different orientations and screen sizes, the columns / rows will be shifted based on available space.