createStackNavigator is giving error : null is not an object (evaluating 't(r(d[1])).default.direction') Not able to get is this error because of an import statement or anything else. Any help will be appreciated

My code for app.js is below :

import React, { Component } from 'react';
    import {
      Platform,
      StyleSheet,
      Text,
      View
    } from 'react-native';
    import { createStackNavigator } from 'react-navigation';
    import Login from './screens/Login';
    import Home from './screens/Home';

    const AppNavigator = createStackNavigator({
      LoginScreen: { screen: Login },
      HomeScreen: { screen: Home }
    });

    export default class App extends Component {
      render() {
        return (
          <AppNavigator />
        );
      }
    }
getting error :

https://i.stack.imgur.com/VFx0a.png

0 Answers