
2-5강
나만의 꿀팁 텍스트 넣기까지는 성공했는데
이미지가 아무리 해도 안 뜨네요ㅠㅠ
작성한 코드 및 에러 메세지
오류 발생 시, 작성한 코드 전체와 에러 메시지를 첨부해 주세요.
import React from 'react';
import { StyleSheet, Text, View, Image, TouchableOpacity, ScrollView} from 'react-native';
const main = 'https://firebasestorage.googleapis.com/v0/b/sparta-image.appspot.com/o/lecture%2Fmain.png?alt=media&token=8e5eb78d-19ee-4359-9209-347d125b322c'
export default function App() {
return (
<ScrollView style={styles.container}>
<Text style={styles.title}>나만의 꿀팁</Text>
<Image style={styles.mainImage} source={{uri:main}}/>
</ScrollView>
)
}
const styles = StyleSheet.create({
container: {
backgroundColor: '#fff',
},
title: {
fontSize: 30,
fontWeight: '700',
marginTop: 50,
marginLeft: 20,
},
mainImage: {
}
})
Tip 2) Ctrl+A(맥의 경우 Command+A) 단축키로 코드를 한 번에 선택할 수 있어요!
