화면의 영역을 나타내는 태그
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<View style={styles.subContainerOne}></View>
<View style={styles.subContainerTwo}></View>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
},
subContainerOne: {
flex:1,
backgroundColor:"yellow"
},
subContainerTwo: {
flex:1,
backgroundColor:"green"
}
});
'앱개발 스터디 > 2주차' 카테고리의 다른 글
Image(assets) (0) | 2022.07.15 |
---|---|
Text (0) | 2022.07.15 |
리액트 네이티브&Expo 설치 및 실행 (0) | 2022.07.14 |
Ajax 시작하기 (0) | 2022.07.14 |
서버-클라이언트 통신 이해하기 (0) | 2022.07.14 |