In my React Native app, I am fetching images from an API with unknown dimensions. How do I auto scale the height if I know my desired width?
Example:
I set t
Have a look at this library react-native-scalable-image. It does exactly what you are asking for.
import React from 'react'; import { Dimensions } from 'react-native'; import Image from 'react-native-scalable-image'; const image = ( '}} /> );