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