title: Import class components from a different file in React Native
body: <p>I have a folder called &quot;app&quot; which contains a &quot;views&quot; folder. Inside views I have a &quot;Home.js&quot; file in which I've defined a class component &quot;Home&quot;. I want to use the Home class in another file &quot;App.js&quot;.
  The following code is what's in the Home.js file.</p>
  <pre><code>  import React from 'react';
    import {View, Text} from 'react-native';
  
      export class Home extends React.Component {
          render () {
              return (
                  &lt;View&gt;
                      &lt;Text&gt; Some text &lt;/Text&gt;
                      &lt;Text&gt; Some other random text &lt;/Text&gt;
                  &lt;/View&gt;
              );
          }
      }
  </code></pre>
  <p>And this is what's in the App.js file.</p>
  <pre><code>import React from 'react';
  import { Home } from '.app/views/Home.js';
  
      export default class App extends React.Component {
        render () {
          return (
            &lt;Home /&gt;
          );
        }
      }
  </code></pre>
  <p>When I try and run it with expo, I get an error &quot;Error: undefined Unable to resolve module '.app/views/Home.js'&quot;
  No matter the path I try to bring Home from, I get the same error, even if I copy and paste the path directly from the Home.js file. I'm curious, I wanna know if this is a code error, or maybe the way I'm bringing up the path is wrong? Any ideas as to how to solve this? Thanks a lot.</p>