그다음에는 App에서 화면 설정해주세요.
App.js
import React from 'react'; import {NavigationContainer} from '@react-navigation/native'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; import HomeScreen from './screens/HomeScreen'; import DetailScreen from './screens/DetailScreen'; import {View, Text, TouchableOpacity} from 'react-native'; import HeaderlessScreen from './screens/HeaderlessScreen'; const Stack (); function () { return ( <NavigationContainer> <Stack.Navigator initialRouteName="Home"> (...) <Stack.Screen name="Headerless" component={HeaderlessScreen} options={{ headerShown: false, }} /> </Stack.Navigator> </NavigationContainer> ); } export default App;