title: React Native navigation TypeError: undefined is not an object (evaluating 'Object.keys(routeConfigs)')
body: <p>I have the following code in App.js file:-</p>
  
  <pre><code>import React, { Component } from 'react';
  import { Platform, StyleSheet, Text, View } from 'react-native';
  import { createAppContainer } from 'react-navigation';
  import { createStackNavigator } from 'react-navigation-stack';
  import { NavigationContainer} from "react-navigation";
  
  
  const Home = ({ navigation }) =&gt; {
    return (
        &lt;View&gt;
          &lt;Text&gt;This is Home page!&lt;/Text&gt;
        &lt;/View&gt;
    )
  }
  
  const Stack = createStackNavigator();
  
  function MyStack() {
    return (
        &lt;Stack.Navigator&gt;
          &lt;Stack.Screen name="Home" component={Home} /&gt;
        &lt;/Stack.Navigator&gt;
    );
  }
   export default function App() {
     return (
         &lt;NavigationContainer&gt;
           &lt;MyStack /&gt;
         &lt;/NavigationContainer&gt;
     );
  }
  </code></pre>
  
  <p>I followed the same instruction on this page:- <a href="https://reactnavigation.org/docs/stack-navigator/" rel="nofollow noreferrer">https://reactnavigation.org/docs/stack-navigator/</a>
  But it gave an error 
  <a href="https://i.stack.imgur.com/zxcZi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zxcZi.png" alt="enter image description here"></a></p>