Я пытаюсь загрузить изображение в React-native, используя <Image source={{}}
со стилем, но изображение не отображается на экране (Использование Genymotion Emulator)
Зависимости заключаются в следующем;
"dependencies": {
"react": "16.6.3",
"react-native": "0.58.3",
},
Приложение. js
import React from 'react';
import { View, Text, Image, StyleSheet } from 'react-native';
const App = () => {
return (
<View style={styles.container}>
<Text style={styles.text}>
Hello world
</Text>
<Image source={{ uri: 'https://randomuser.me/api/portraits/men/1.jpg' }}
style={styles.img}
/>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
alignItems: "center"
},
text: {
color: "darkslateblue",
fontSize: 30
},
img: {
width: 100,
height: 100,
borderRadius: 100 / 2,
},
})
export default App
Любая помощь будет оценена