SmitSherlock
SmitSherlock

Reputation: 61

How to do styling in react native which makes app UI consistent over all types of mobile phone sizes

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

Answers (1)

jaws
jaws

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

Related Questions