I'm using react-navigation@4.0.10 in my React Native app, and have a Login screen and two TabNavigator screens. Logging in from the Login screen takes me to TabNavigator_1, and if I log out from TabNavigator_1 I just use this.props.navigation.goBack(). The problem is, to get to TabNavigator_2 I click a button in TabNavigator_1 which triggers this.props.navigation.navigate('TabNavigator_2'), so TabNavigator_2 is now on top of the stack, and calling this.props.navigation.goBack() would just take me back to TabNavigator_1 instead of Login.
What's the best way to approach this, so that clicking Log out from TabNavigator_1 and TabNavigator_2 takes me back to Login?