2021年2月7日星期日

React Native ImageBackground showing white image only

My ImageBackground module is only showing a white background. The code shown is basically a boilerplate template from React's official documentation on ImageBackgrounds. My uri is not null. "props.route.params.image" is type TakePictureResponse from react-native-camera module.

I look at similar questions to this one, the solutions to theirs were already implemented in mine.

const styles = StyleSheet.create({  container: {      flex: 1,      flexDirection: 'column',    },  image: {      flex: 1,      resizeMode: 'cover',      justifyContent: 'center',    }  })    render() {      return (        <View style={styles.container}>          <ImageBackground            source=            style={styles.image}          />        </View>      );    }  
https://stackoverflow.com/questions/66093407/react-native-imagebackground-showing-white-image-only February 08, 2021 at 05:42AM

没有评论:

发表评论