1render() {
2 let image = this.props.requireSource;
3 const { width, height } = Image.resolveAssetSource(image);
4 const ratio = height / width;
5 const SCREEN_WIDTH = Dimensions.get('window').width;
6
7 return (
8 <Image source={image} style={{width: SCREEN_WIDTH, height: SCREEN_WIDTH*ratio}} resizeMode="contain"/>
9 );
10}
11