title: How to access state of one component into another component in react
body: <pre><code>import React, { Component } from 'react';
  class one extends React.Component 
  {
      constructor()
      {
          super();
          this.state = {
              number:26
          }
      }
      render()
      {
          return(
              &lt;div&gt;&lt;/div&gt;
          );
      }
  }
  export default one;
  
  import React, { Component } from 'react';
  import one from './one'
  class HomePage extends React.Component 
  {
      render()
      {
          return(
              &lt;div&gt;{one.state.number}&lt;/div&gt;
          );
      }
  }
  export default HomePage;
  </code></pre>
  
  <p><strong>is it possible to access number state</strong>
  is there any way to access state of one component into another component?
  please suggest me if any solution is present.</p>