I want a React Native Image to have a width of 50% of the available screen-width, no modification to width:height ratio of the image.
Any hints how to solve this?
Local images can be rendered without giving a fixed width and height but, for remote images you must provide dimensions as react-native cant calculate them on runtime. So, the following works for me
and apply following styles.
thumbContainer: {
width: '100%',
height: 400,
},
thumbnail: {
flex: 1,
width: undefined,
height: undefined,
resizeMode: 'cover'
},