title: ReactJS async, wait for results
body: <p>I am new to ReactJS and trying to understand it. Now I have a situation where I am loading information needed for rendering. But as it is asynchronous the component renders itself before the information is passed to it. </p>
  
  <pre><code>var info;
  
  function getInfo() {
      //this will come from backend REST with Backbone which takes a bit
  }
  
  var InfoPage = React.createClass({
      render: function() {        
          getInfo()
  
          return (
              &lt;div&gt;info: {info}&lt;/div&gt;            
          );
      }
  });
  </code></pre>
  
  <p>Now the div will not show the info-value as it is not yet set in the render. So how can I have get render to wait for the info? Or how should this be solved?</p>
  
  <p>The actual React.renderComponent is called from top level and that triggers all the subcomponents so I think I cannot force new render (and I shouldn't?).</p>