将React Navigation v3转换为v5时出现问题

时间:2020-02-21 09:27:50

标签: react-native react-navigation react-navigation-v5

有人可以帮我如何将其转换为v5语法吗?

const Navigator = createSwitchNavigator(
  {
    [screens.App]: AppNavigator,
  },
  {
    initialRouteName: screens.Init,
    headerMode: 'screen',
  },
);
const RootNavigator = createAppContainer(Navigator);
export default createStackNavigator(
  {
    [screens.Auth]: AuthScreen,
  },
  {
    initialRouteKey: screens.Auth,
    headerMode: 'screen',
  },
);

我似乎无法解决自己的问题,我的大脑正像地狱一样疼痛。预先感谢大家。

0 个答案:

没有答案