I would like after Login (Welcome) the user to navigate to Home. I reset the history so the user cannot go back like this:
const actionToDispatch = Navigatio
I found the solution here: https://github.com/react-community/react-navigation/pull/789.
const resetAction = NavigationActions.reset({
index: 0,
actions: [
NavigationActions.navigate({ routeName: 'Welcome' }),
],
key: null
});
this.props.navigation.dispatch(resetAction);
key: null is the important part.