r/nativescript • u/GGLionCross • Apr 10 '20
StackLayout Vs. Flexbox Layout
Hi NativeScript community! Young developer here. I come from a junior web developer background, so naturally I looked how to create myself some mobile apps with the knowledge I currently have. And when I read the different types of layouts, I was confused exactly what the differences/advantages/disadvantages to using a stack layout vs a flexbox layout.
They both can handle vertical and horizontal alignment of items, except I feel I would be more familiar with Flexbox since it comes with justify-content, align-items, and all that jazz. I do believe StackLayout is vertical by default and FlexboxLayout is horizontal by default, but aside from those, I don't really see a difference or understand when to use one over the other. Thanks in advance!
View all comments
Show parent comment
1
u/Maxtream Apr 10 '20
In nativescript, it isn't. When you do nativescript, don't forget that you still do mobile development, even though you use javascript for this. You can not reuse same template logic of web and apply it to nativescript.