title: Handling deep linking with react navigation v5 authentication flow
body: <p>I want to access an authenticated screen from a deep-link using react navigation v5 with expo.
  So I followed the <a href="https://reactnavigation.org/docs/en/auth-flow.html" rel="nofollow noreferrer">authentication flow</a> from react navigation and I ended with a start up navigator like that :</p>
  
  <pre><code>const StartupNavigator = (props: Partial&lt;StackNavigatorProps&gt;): ReactElement =&gt; {
      const {startUp} = useStartUp();
  
      const renderStacks = () =&gt; {
          if (startUp.isReady) {
              return &lt;Stack.Screen name={Routes.HOME} component={BottomTabNavigator}/&gt;;
          }
          if (startUp.isLoading) {
              return &lt;Stack.Screen name={Routes.CHECK} component={CheckScreen}/&gt;;
          }
          if (startUp.isBuilding) {
              return &lt;Stack.Screen name={Routes.BUILD} component={BuildScreen}/&gt;;
          }
          if (startUp.isAuthentifying) {
              return &lt;Stack.Screen name={Routes.AUTH} component={AuthNavigator}/&gt;;
          }
      };
  
      return (
          &lt;Stack.Navigator {...props} headerMode={"none"}&gt;
              {renderStacks()}
          &lt;/Stack.Navigator&gt;
      );
  };
  </code></pre>
  
  <p>So I have 4 initial state : </p>
  
  <ol>
  <li><strong>isReady</strong> : The user is authenticated, and can access protected
  screens.</li>
  <li><strong>isLoading</strong>: First state when opening the app, check the app
  version..... then set the <code>isAuthentifying</code> state</li>
  <li><strong>isAuthentifying</strong>: The authentication navigator for registering, and login.</li>
  <li><strong>isBuilding</strong>: After authentication, fetch the user information, then set the state to <code>isReady</code></li>
  </ol>
  
  <p>Note, when opening the app, the state is set by default to <code>isLoading</code></p>
  
  <p>Then, I made an NavigationContainer following <a href="https://reactnavigation.org/docs/deep-linking/" rel="nofollow noreferrer">this link</a> for handling deep-linking</p>
  
  <p>How to redirect to an authenticated screen passing by the authentication (note that I don't have an auto login process)</p>