Reputation: 61
I have built an app in react native ,I have used dimensions in react native to get the screen size of phone for styling purpose still its not working properly for some handsets.My UI looks shabby on some phones.Did i missed out something other than dimensions property and also can anyone tell me how to place components which looks consistent over all size of phones
Upvotes: 0
Views: 166
Reputation: 2022
This is precisely what flexbox is for: https://facebook.github.io/react-native/docs/flexbox.html
It allows your components to be positioned and sized proportionally to the amount of space available on the device.
Upvotes: 1