Reputation: 909
I'm using ReactNative and Android. I am using style-components for css
As a result of designing with styled-component, the aspect ratio fits well on my device, but when tested with another device, the screen is broken or the ratio does not match.
So, what I am curious about is what method is the best way to use the same aspect ratio, resolution, and screen size to fit all devices.
Upvotes: 0
Views: 325
Reputation: 2301
The best way I use https://www.npmjs.com/package/react-native-responsive-screen
for responsive UI. Just use wp('10%') or hp('20%') wherever possible.
Upvotes: 1