title: How to reset a navigation multiple navigation stacks on user auth change?
body: <p>I have been using react-navigation for a couple of months now for my react native/Expo app and it's been quite helpful. However, I have troubles understanding the reset mechanism and would be very grateful if someone would explain it to me since the documentation provides almost no details about it.</p>
  
  <p>I have nested stack navigators, a bottom tab bar navigator and a drawer in which I have a logout button that can be called from any screen of the app. Let's say this is my navigation</p>
  
  <pre><code>HOME
  DASHBOARD
  POST
    PostList (initial route of the stack)
    PostCreate
    PostEdit
  PAYMENT
  
  </code></pre>
  
  <p>When I go to post list, then post create and then Dashboard. After logout I'm redirected to HOME, I log in with another account, and if I try to go to the initial route of post, I'm redirected to PostCreate instead of PostList.</p>
  
  <p>I tried to dispatch a reset action when my logout button is pressed but this doesn't seem to be a reliable solution because for some reason, I can't redirect to HOME from my Drawer when the DASHBOARD Screen is active. </p>
  
  <pre><code>const goToHomeAction = StackActions.reset({
              index: 1,
              actions: [NavigationActions.navigate({ routeName: HOME_ROUTE })],
          });
          this.props.navigation.dispatch(goToHomeAction);
  </code></pre>
  
  <p>It throws an error "there is no route defined for key HomeRoute, must be one of 'Dashboard'". </p>
  
  <p>Is there a way to just simply clear all navigation state, just go back to the initial screen of the app and clear all the stack navigators so the user would go to their respective initial screens ?</p>