Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

React Native: Navigation is not working properly after eject from Expo

$
0
0

I am developing an app with React Native and Expo and all has been working fine until I ejected the app. Now the root SwitchNavigator is not operating as intended, at least on iOS.

I have 3 possible main Routes AuthLoading, Auth, Main as shown below:

import { createAppContainer, createSwitchNavigator } from "react-navigation";

import MainTabNavigator from "./MainTabNavigator";
import AuthLoadingScreen from "../screens/auth/AuthLoadingScreen";
import AuthStack from "./auth/AuthStack";
import TestScreen from "../screens/TestScreen";

export default createAppContainer(
  createSwitchNavigator(
    {
      AuthLoading: AuthLoadingScreen,
      Auth: AuthStack,
      Test: TestScreen,
      Main: MainTabNavigator
    },
    {
      headerMode: "none",
      initialRouteName: "AuthLoading"
    }
  )
);

Unless I comment out the last route it will always move there.

Using

React Native Expo SDK: 36.0.1

React Navigation: 3.12.0


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>