0

我正在尝试制作一个登录屏幕,在登录屏幕之后,它应该带抽屉导航进入主屏幕。我正在尝试在 App.js 文件中设置应用程序容器,所以我遇到了麻烦。

const App = () => {
  return (
    <AppContainer />
  );
}


const DrawerNavigator = createStackNavigator({
  <NavigationContainer independent = {true}>
    <Drawer.Navigator initialRouteName="">
      <Drawer.Screen name="" component = "">
      <Drawer.Screen name="" component = "">
      <Drawer.Screen name="" component = "">
    </Drawer.Navigator>
  </NavigationContainer>
})

const AuthNavigator = createStackNavigator({
  Auth: AuthScreen
})

const MainNavigator = createSwitchNavigator({
  Auth: AuthNavigator,
  AppScreen: DrawerNavigator
})

const AppContainer = createAppContainer(MainNavigator);

export default App; 

4

0 回答 0