React Native – Flexbox
To accommodate different screen sizes, React Native offers Flexbox support.
We will use the same code that we used in our React Native - Styling chapter. We willonly change the PresentationalComponent.
To achieve the desired layout, flexbox offers three main properties − flexDirection justifyContent and alignItems.
The following table shows the possible options.
If the items needs to be aligned verticaly and also centralized, consider the example given below.