더북(TheBook)

screens/RootStack.js

(...)
import UploadScreen from './UploadScreen';

const Stack = createNativeStackNavigator();

function RootStack() {
  (...)

  return (
    <Stack.Navigator>
      {user ? (
        <>
          <Stack.Screen
            name="MainTab"
            component={MainTab}
            options={{headerShown: false}}
          />
          <Stack.Screen
            name="Upload"
            component={UploadScreen}
            options={{title: '새 게시물', headerBackTitle: '뒤로가기'}}
          />
        </>
      ) : (...)}
    </Stack.Navigator>
  );
}

export default RootStack;
신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.