title: Where is placed createSwitchNavigator in react-navigation 5.x for migrating from react-navigation 4 to 5.x
body: <p>I'm migrating a React Native application from react-navigation 4 to 5.x and i can't find which package contains createSwitchNavigation. Specifically i have doubts with the auth token check part.</p>
  
  <p>With react-navigation 4 i had:</p>
  
  <pre class="lang-js prettyprint-override"><code>const switchNavigator = createSwitchNavigator({
    ResolveAuth: ResolveAuthScreen,
    signinFlow: createStackNavigator({
      Signup: SignupScreen,
      Signin: SigninScreen,
    }),
    appFlow: createBottomTabNavigator({
      TrackCreate: TrackCreateScreen,
      trackListFlow: createStackNavigator({
        TrackList: TrackListScreen,
        TrackDetail: TrackDetailScreen
      }),
      Account: AccountScreen,
    })
  }, {
    initialRouteName: 'ResolveAuth'
  });
  </code></pre>
  
  <p>Then i have a file containing ResolveAuthScreen component.</p>
  
  <pre class="lang-js prettyprint-override"><code>import React, { useEffect } from 'react';
  import { connect } from 'react-redux';
  
  const ResolveAuthScreen = (props) =&gt; {
    useEffect(() =&gt; {
      if (!props.token) {
        props.navigation.navigate('loginFlow');
      } else {
        props.navigation.navigate('TrackList');
      }
    }, []);
  
    return null;
  };
  
  const mapStateToProps = (state) =&gt; {
    return {
      token: state.auth.token,
    };
  };
  
  export default connect(mapStateToProps, null)(ResolveAuthScreen);
  </code></pre>
  
  <p>The rest of components are not important for this doubt. I want to know how to replicate the same Switch navigation flow.
  I would like to know how can i create something like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>const Switch = createSwitchNavigator();
  
  export default function App() {
    return (
      &lt;NavigationContainer&gt;
        &lt;Switch.Navigator&gt;
          &lt;Switch.Screen name="ResolveAuth" component={ResolveAuthScreen} /&gt;
          &lt;Switch.Screen name="signinFlow" component={SignInFlowScreens} /&gt;
          &lt;Switch.Screen name="appFlow" component={AppFlowScreens} /&gt;
        &lt;/Switch.Navigator&gt;
      &lt;/NavigationContainer&gt;
    );
  }
  </code></pre>