-1
I’m starting in React-On, so I was making an App watching a video, and when I went to put an image it didn’t appear, I put it inside a folder, and when I put the image path doesn’t appear anything. I’ve tried everything, but I did exactly what the video guy did. Video link: https://www.youtube.com/watch?v=ZSV4fsaVTIs&t=2101s
import React from 'react';
import { View, Text, StyleSheet, Button, Image } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Image source={require('./src/assets/logo.png')}/>
<Text>ADSASDAaS</Text>
</View>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#f3f3ff'
}
});
I tried but it didn’t work either, but I was able to put an image using Uri and an internet link. Mt strange, I will investigate further to try to find out why I can not put a local image.
– Eliel Oliveira