title: How to use createStackNavigator in React Native?
body: <p><strong>My current code</strong></p>
  
  <p>App.js</p>
  
  <pre class="lang-js prettyprint-override"><code>import React from 'react';
  import AuthenticationNavigator from 'app/src/navigations/AuthenticationNavigator';
  
  export default class App extends React.Component {
    render() {
      return &lt;AuthenticationNavigator /&gt;;
    }
  }
  </code></pre>
  
  <p>AuthenticationNavigator.js</p>
  
  <pre class="lang-js prettyprint-override"><code>import { createSwitchNavigator, createAppContainer } from 'react-navigation';
  onst AuthenticationNavigator = createAppContainer(
    createSwitchNavigator(
      {
          Loading: { screen: LoadingScreen },
          Login: { screen: LoginScreen },
      },
      {
          initialRouteName: 'Loading',
      },
    ),
  );
  export default AuthenticationNavigator;
  </code></pre>
  
  <p>I changed AuthenticationNavigator.js to</p>
  
  <pre class="lang-js prettyprint-override"><code>import { createStackNavigator } from '@react-navigation/stack';
  const AuthenticationNavigator = createStackNavigator(
    {
        Loading: { screen: LoadingScreen },
        Login: { screen: LoginScreen },
    },
    {
        initialRouteName: 'Loading',
    },
  );
  
  export default AuthenticationNavigator;
  </code></pre>
  
  <p>I wanna use createStackNavigator instead of using createSwitchNavigator.</p>
  
  <p>I'm facing </p>
  
  <blockquote>
    <p>Error: Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API with React Navigation 5? </p>
  </blockquote>
  
  <p><strong>package.json</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>{
    "name": "app",
    },
    "dependencies": {
      "@react-navigation/stack": "^5.2.18",
      "react-navigation-stack": "^2.1.1",
    },
    "devDependencies": {
    },
    "private": true
  }
  </code></pre>
  
  <p>There are 2 different react-navigation-stack.
  Does this bring the error?</p>
  
  <p>I would appreciate it if you could give me any advices :)</p>