Check out example codes for "what does flex do". It will help you in understanding the concepts better.

Code Example 1

The flex CSS property sets how a flex item will grow or shrink to fit the space
available in its flex container. It is a shorthand for flex-grow , flex-shrink ,
and flex-basis .

Learn ReactJs, React Native from