React Native 中单个屏幕的多个导航屏幕

Multiple navigation screens from single screen in React Native

我正在开发一个具有启动屏幕的 React Native 应用程序。启动屏幕有三个按钮,它们重定向到各自的 stackNavigators。我应该如何将他们重定向到他们的特定屏幕。

你可以使用switchNavigator,有一个简单的例子:

const RootNavigator = createSwitchNavigator(
  {
    Auth: AuthStack,
    App: AppStack
  }
);

其中 AuthStackAppStackstack navigators,然后只需调用 this.props.navigation.navigate("Auth") 导航到所需的 stack