// ./App.tsx
import React from 'react'; //코드를 자바스크립트로 만들어주는 필수요소
import {SafeAreaView, Text} from 'react-native'; //사용할 코어 컴포넌트
import ArrowComponent from './src/screens/ArrowComponent'; // ArrowComponent.tsx를 import
export default function App() {
return(
<SafeAreaView>
<Text> Hello RN World! </Text>
<ArrowComponent/>
</SafeAreaView>
)
}
// ./src/screens/ArrowComponent.tsx
import React from 'react';
import {Text} from 'react-native';
function ArrowComponent() {
return (
<Text>함수 컴포넌트</Text>
)
}
export default ArrowComponent
[참조]
'Development > React' 카테고리의 다른 글
[React Native] build 오류시 (0) | 2022.09.23 |
---|---|
[React-Native] 프로젝트 생성 (0) | 2022.07.20 |
react create (0) | 2022.07.20 |
“Could not resolve dependency: npm ERR! peer react@"^16.8" from @react-native-community/async-storage@1.12.1” Code Answer’s (0) | 2022.07.20 |