다음으로 이 컴포넌트를 App에서 불러와 DateHead 컴포넌트 하단에 사용해보세요.
App.js
import React from 'react'; import {StyleSheet} from 'react-native'; import DateHead from './components/DateHead'; import {SafeAreaProvider, SafeAreaView} from 'react-native-safe-area-context'; import AddTodo from './components/AddTodo'; function () { const today new Date(); return ( <SafeAreaProvider> <SafeAreaView edges={['bottom']}> <DateHead date={today} /> <AddTodo /> </SafeAreaView> </SafeAreaProvider> ); } const styles StyleSheet. ({}); export default App;