App, RootStack, MainTab순으로 수정하겠습니다.

    App.tsx

    import React from 'react';
    import {NavigationContainer} from '@react-navigation/native';
    import RootStack from './screens/RootStack';
    
    function App() {
      return (
        <NavigationContainer>
          <RootStack />
        </NavigationContainer>
      );
    }
    
    export default App;

    screens/RootStack.tsx

    import React from 'react';
    import {createNativeStackNavigator} from '@react-navigation/native-stack';
    import {RootStackParamList} from './types';
    import MainTab from './MainTab';
    
    const Stack = createNativeStackNavigator<RootStackParamList>();
    
    function RootStack() {
      return (
        <Stack.Navigator>
          <Stack.Screen
            name="MainTab"
            component={MainTab}
            options={{headerShown: false}}
          />
        </Stack.Navigator>
      );
    }
    
    export default RootStack;
    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.