-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Labels
Description
I have several nested navigators with the following structure:
StackNavigator
Home
Login
Authenticated -> CustomTabNavigator
ScreenOne -> StackNavigator
ScreenOneDetails
ScreenOneSettings
ScreenTwo
How can I navigate from ScreenOneDetails to Home?
Already tried to dispatch it as an action:
const resetAction = NavigationActions.reset({
index: 0,
actions: [
NavigationActions.navigate({ routeName: 'Home' })
]
});
this.props.navigation.dispatch(resetAction);
this.props.navigation.goBack(null);
But all I get is an error - There is no route defined for key splash. Must be one of: 'ScreenOneDetails','ScreenOneSettings'
I know that this makes sense, as the navigation prop that is passed to ScreenOneDetails is the one created by the ScreenOne StackNavigator. However, is there any way to access the navigation prop created by parent navigators? And how would I go the other way around, e.g: from Login to ScreenOneSettings?
Reactions are currently unavailable