title: How to access one component's state from another component
body: <p>How do I access one component's state in another component? Below is my code and I'm trying to access the state of component <code>a</code> in component <code>b</code>.</p>
  
  <pre class="lang-js prettyprint-override"><code>var a = React.createClass({
      getInitialState: function () {
          return {
              first: "1"
          };
      },
  
      render: function () {
          // Render HTML here.
      }  
  });
  
  var b = React.createClass({
      getInitialState: function () {
          return {
              second: a.state.first
          };
      },
  
      render: function () {
          // Render HTML here.
      }  
  });
  </code></pre>
  
  <p>But I'm not getting anything.</p>