title: Expected Component class, got [object Object] - React-Native
body: <p>I have encountered this problem on "Expected a Component class, Got [object Object]". I have lookup all the related problems on Stack, I have followed most of them by Capitalising my objects but the same errors occurred. Some great pointers would be appreciated.</p>
  
  <p>this is my App.js file</p>
  
  <pre><code>import React from 'react';
  import { StyleSheet, AppRegistry, Text, View } from 'react-native';
  import Login from "./Login";
  
  export default class App extends React.Component {
    render() {
     return (
       &lt;Login /&gt;
     );
    }
   }
  </code></pre>
  
  <p>and my Login.js file</p>
  
  <pre><code>import React from 'react';
  import{
   StyleSheet,
   View,
   Text,
   Image,
   touchableOpacity,
   TextInput,
   KeyboardAvoidingView
  } from 'react-native';
  
  export default class Login extends React.Component{
   render(){
    return(
     &lt;KeyboardAvoidingView
       behavior="padding"
       style={styles.container}&gt;
        &lt;View style={styles.logoContainer}&gt;
        &lt;/View&gt;
        &lt;View style={styles.formContainer}&gt;
          &lt;TextInput
            underlineColor="transparent"
            placeholder="Email"
            returnKeyType="next"
            keyboardType="email-address"
            onSubmitEditing={()=&gt; this.passwordInput.focus()}
            style={styles.input}/&gt;
          &lt;TextInput
            underlineColor="transparent"
            placeholder="Password"
            secureTextEntry
            returnKeyType="go"
            ref={(input) =&gt; this.passwordInput = input}
            style={styles.input}/&gt;
            &lt;touchableOpacity
              style={styles.buttonContainer}&gt;
              &lt;Text style={styles.textButton}&gt;Login&lt;/Text&gt;
            &lt;/touchableOpacity&gt;
        &lt;/View&gt;
      &lt;/KeyboardAvoidingView&gt;
      );
     }
    }
  </code></pre>
  
  <p>It returns an error of Expected a component class, got [object Object]</p>
  
  <p>Thanks in advance. It is either I'm too blind to see my mistake or I did it completely wrong.</p>