How to access js files from components folder in React Native ios project
<p>I am unable to access components folder in React Native Project IOS.</p>

<p><strong>I am getting following error:</strong></p>

<blockquote>
  <p>Unable to resolve module ./Login from
  ....../ReactNative/ReactNativeProject/components/App.js: Unable to find
  this module in its module map or any of the node_modules directories
  under ......./ReactNative/ReactNativeProject/components/Login.j and its
  parent directories.</p>
</blockquote>

<p>I have referred following link:
<a href="http://caroaguilar.com/post/react-native-navigation-tutorial/" rel="noreferrer">http://caroaguilar.com/post/react-native-navigation-tutorial/</a></p>

<p><strong>index.ios.js</strong> (ReactNativeProject/index.ios.js)</p>

<pre><code>"use strict";

import React, { AppRegistry } from 'react-native';
import App from './components/App';

AppRegistry.registerComponent('ReactNativeProject', () =&gt; App);
</code></pre>

<p><strong>App.js</strong> (ReactNativeProject/components/App.js)</p>

<pre><code>  'use strict'

    import React, {Component} from 'react';
    import {
        AppRegistry,
        StyleSheet,
        NavigatorIOS,
    } from 'react-native';
    var Login = require('./Login');

    class App extends Component {
        render() {
            return (
              &lt;NavigatorIOS
                style={styles.navigationContainer}
                initialRoute={{
                title: "Login Page",
                component: Login,
              }} /&gt;
          );
        }
    }

    var styles = StyleSheet.create({
        navigationContainer: {
            flex: 1
        }
    });

    export default App;
</code></pre>

<p><strong>Login.js</strong> (ReactNativeProject/components/Login.js)</p>

<pre><code>"use strict";
    import React, {Component} from 'react';
    import {
        StyleSheet,
        Text,
        TextInput
    } from 'react-native';
    import Button from 'react-native-button';
    import styles from './login';


    class Login extends Component {

        constructor(props) {
            super(props);
            this.state = {
              username: "",
              password: "",

            };
        }

        render() {
            return (

              &lt;View style={styles.container}&gt;
                  &lt;View style={styles.textContainer}&gt;
                      &lt;TextInput
                          style={styles.inputUsername}
                          placeholder="Enter email ID"
                          value={this.state.username}
                          clearButtonMode = 'while-editing'/&gt;
                      &lt;TextInput
                          style={styles.inputPassword}
                          placeholder="Enter Password"
                          value={this.state.password}
                          password={true}
                          secureTextEntry={true}
                          clearButtonMode = 'while-editing' /&gt;

                     &lt;Button style={styles.login}
                             styleDisabled={{color: 'red'}}&gt;
                             Login
                      &lt;/Button&gt;
                  &lt;/View&gt;
              &lt;/View&gt;
            );
        }

    module.exports = Login;
</code></pre>