title: React.createElement: type is invalid
body: <p>I'm new to react and react native. I want to use a libary for react native. 
  <a href="https://github.com/FaridSafi/react-native-gifted-chat" rel="nofollow noreferrer">https://github.com/FaridSafi/react-native-gifted-chat</a>
  But I got this error :</p>
  
  <blockquote>
    <p>Warning: React.createElement: type is invalid -- expected a string
    (for built-in components) or a class/function (for composite
    components) but got: object. You likely forgot to export your
    component from the file it's defined in.</p>
    
    <p>Check your code at registerRootComponent.js:21.
        in ExponentRootComponent (at renderApplication.js:35)
        in RCTView (at View.js:128)
        in View (at AppContainer.js:93)
        in RCTView (at View.js:128)
        in View (at AppContainer.js:92)
        in AppContainer (at renderApplication.js:34)</p>
  </blockquote>
  
  <p>Here my code :</p>
  
  <pre><code>import React from 'react';
  import { StyleSheet, Text, View, KeyboardAvoidingView, Image, TextInput } from 'react-native';
  import GiftedChat from 'react-native-gifted-chat';
  
  class App extends React.Component {
  
    state = {
      messages: [],
    };
  
  
    componentWillMount() {
      this.setState({
        messages: [
          {
            _id: 1,
            text: 'Hello developer',
            createdAt: new Date(),
            user: {
              _id: 2,
              name: 'React Native',
              avatar: 'https://facebook.github.io/react/img/logo_og.png',
            },
          },
        ],
      });
    }
  
    onSend(messages = []) {
      this.setState((previousState) =&gt; ({
        messages: GiftedChat.append(previousState.messages, messages),
      }));
    }
  
    render() {
      return (
        &lt;GiftedChat
          messages={this.state.messages}
          onSend={(messages) =&gt; this.onSend(messages)}
          user={{
            _id: 1,
          }}
        /&gt;
      );
    }
  
  }
  </code></pre>
  
  <p>I add this lib with : </p>
  
  <pre><code>yarn add react-native-gifted-chat
  </code></pre>
  
  <p>I use Expo-XDE to launch my app on a android emulator.</p>