title: React - User-Defined JSX Components Not rendering
body: <p>I've been trying to make an AJAX call and then add it to my view after it has been retrieved. </p>
  
  <p>Nothing really happens with the current code. </p>
  
  <pre><code>const View = () =&gt; (
      &lt;div&gt;
       &lt;h1&gt;Reports&lt;/h1&gt;
     &lt;statisticsPage /&gt;
      &lt;/div&gt;
  );
  export default View;
  
  
  var statisticsPage = React.createClass({
    getInitialState: function() {
       return {info: "loading ... "};
    },
    componentDidMount: function() {
       this.requestStatistics(1);
    },
    render: function() {
      return (
          &lt;div&gt;info: {this.state.info}&lt;/div&gt;
      );
    },
    requestStatistics:function(){
        axios.get('api/2/statistics')
        .then(res =&gt; {
          values = res['data']
          this.setState({info:1})
          console.log('works!!')
        });
  
      }
  
    })
  </code></pre>