title: React native: Component not defined? Can't import?
body: <p>Ok, very new to react native here and Im trying to very simply import another .js file and have that be run in the main <code>render()</code> func in index.ios.js</p>
  
  <p>I have looked everywhere and tried both <code>import and require</code> to do this, however I am stuck with error:</p>
  
  <p><a href="https://i.stack.imgur.com/BXIQN.png" rel="noreferrer"><img src="https://i.stack.imgur.com/BXIQN.png" alt="Component is not defined"></a>  </p>
  
  <p>Here is what I have, the error is thrown at just the addition of the import line:</p>
  
  <pre><code>import React, { Component } from 'react';
  import { Button, Card } from 'react-native-material-design';
  import {
    StyleSheet,
    Text,
    View,
    Animated,
    Easing,
    ScrollView,
    RefreshControl,
    AppRegistry
  } from 'react-native';
  //import { Container, Content } from 'native-base';
  
  import TestClass from "./TestClass";
  //var animation = require('./TestClass');
  
  //BODY
  export default class SkysReact extends Component {
  
  
    render() {
      return (&lt;View style={styles.container}&gt;
      &lt;TestClass/&gt;
      &lt;/View&gt;);
  
      // return (&lt;View style={styles.container}&gt;
      // {this.test()}
      // &lt;/View&gt;);
    }
    test() {
    console.log("Hello World")
  }
  
  animate()
  {
    console.log("animate");
  }
  }
  
  const styles = StyleSheet.create({
    container: {
      flex: 1,
      justifyContent: 'center',
      alignItems: 'center',
      backgroundColor: '#404040',
    },
    welcome: {
      fontSize: 20,
      textAlign: 'center',
      margin: 10,
      color: '#333333'
    },
    instructions: {
      textAlign: 'center',
      color: '#333333',
      marginBottom: 5,
    },
  });
  
  AppRegistry.registerComponent('SkysReact', () =&gt; SkysReact);
  </code></pre>
  
  <p>And my other class:</p>
  
  <pre><code>import React from 'react';
  import Animation from 'lottie-react-native';
  import {
    StyleSheet,
    Text,
    View,
    Animated,
    Easing,
    ScrollView,
    RefreshControl,
    AppRegistry
  } from 'react-native';
  
  export default class TestClass extends Component { // not defined error here
  
      render() {
        return (&lt;View style={styles.container}&gt;
        {this.test()}
        &lt;/View&gt;);
      }
      test() {
      console.log("Hello World 2222")
    }
  }
  module.exports = TestClass;
  </code></pre>
  
  <p>How can I just display TestClass in my index.ios.js? What is wrong?</p>