title: React JS access states / props from another component
body: <p>I'm new to React, I am unable to access <code>Login</code> component state in <code>Member</code> component:</p>
  
  <p><strong>App.js:</strong></p>
  
  <pre><code>export default React.createClass({
    getInitialState: function() {
      return {
                 testp : ''
        }
    },
    componentDidMount() {    
        var abc = "asdadaddasad";
         this.setState({testp : abc})
    },
    render() {
          &lt;div&gt;
         &lt;header&gt;
              &lt;div className="menu-trigger"&gt;
                  &lt;i className="fa fa-bars" aria-hidden="true"&gt;&lt;/i&gt;
              &lt;/div&gt;
              &lt;div className="container"&gt;
                  &lt;ul className="fR clearfix"&gt;
                      &lt;li&gt;&lt;NavLink to="/" onlyActiveOnIndex&gt;Home&lt;/NavLink&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;NavLink to="/members"&gt;Members&lt;/NavLink&gt;&lt;/li&gt;
            &lt;li&gt;&lt;NavLink to="/register"&gt;Register&lt;/NavLink&gt;&lt;/li&gt;
             &lt;li&gt;&lt;NavLink to="/login"&gt;Login&lt;/NavLink&gt;&lt;/li&gt;
                  &lt;/ul&gt;
                &lt;/div&gt;
          &lt;/header&gt;
           &lt;div className="content-row"&gt;
              &lt;div className="container"&gt;
                   {this.props.children}
             &lt;/div&gt;
          &lt;/div&gt;
           &lt;/div&gt;
     }
  })
  </code></pre>
  
  <p><strong>Login.js:</strong></p>
  
  <pre><code>import React from 'react';
  import Member from './Member';
  var Login = React.createClass({
    getInitialState: function() {
      return {
        loginname : ''
      }
    },
    componentDidMount() {    
      var test = 'abc';
      this.setState({loginname : test});
    },
    render() {
      return &lt;div&gt;test&lt;/div&gt;
    }
  });
  export default Login
  </code></pre>
  
  <p><strong>Member.js:</strong></p>
  
  <pre><code>import React from 'react';
  import Login from './Login';
  
  var Member = React.createClass({
    render() {
      return &lt;div&gt;{this.props.loginname}&lt;/div&gt;
              &lt;div&gt;{this.props.prop11}&lt;/div&gt;
             &lt;div&gt;{this.props.testp}&lt;/div&gt;
    }
  });
  export default Member
  </code></pre>
  
  <p>How do I access <code>Login</code> component state in another JS file? 
  Could anyone please help me figure this out?</p>