I've a custom navigator because I wanted to go back to the previous screen using a back swipe gesture. Below is the code of the main file from where the navigators are called.
const MainSwipeStack = () => {
return(
<Navigator>
<Route name="LoggedOutHome" component={LoggedOutHome} />
<Route name="SignUp" component={SignUp} />
<Route name="SignupUsername" component={SignupUsername} />
<Route name="Login" component={Login} />
</Navigator>
);
}
export default createSwitchNavigator({
SwipeStack: {screen: MainSwipeStack},
TabHolder: {screen: TabHolder}
}, {
initialRouteName: 'SwipeStack',
headerMode: 'none',
});
And below is the link to the Navigator.js
code. (I didn't add the code here because it's a long code.)
https://gist.github.com/shubham6996/a4197d2d0b664d4aabe01091cac6c91e
And the TabHolder
takes me to the screen which has createBottomTabNavigator
.
So, now I'm not able to navigate from the Login
screen to TabHolder
stack.
How can I navigate from Login
which is in a custom navigator to TabHolder
stack?