title: React componentDidMount not updating the state
body: <p>I have a react component which starts with a blank default state in the constructor method.
  When the componentDidMount I want to update the state with stuff which I get from my API via AJAX.</p>
  
  <p>The code for this component looks as following : </p>
  
  <pre><code>import React from 'react';
  import Header from './Header';
  import FeedOwnerColumn from './FeedOwnerColumn';
  import FeedColumnRight from './FeedColumnRight';
  import ReportBug from './ReportBug';
  
  class FeedApp extends React.Component{
    constructor(){
      super();
  
      this.addComment = this.addComment.bind(this);
      this.componentDidMount = this.componentDidMount.bind(this);
  
      this.state = {
        ownerInfo:{},
        ownerDogs:[],
        ownerApps:[],
        ownerChat:{},
        posts:[]
      }
    }
    componentDidMount(e){
      var that = this;
      $.get('/api/getUserInit', function(result) {
        console.log(result);
        this.setState({
          ownerInfo: result.ownerInfo,
          ownerDogs: result.ownerDogs,
          ownerNotifications: result.ownerNotifications,
          ownerChat: result.ownerChat,
          posts: result.posts
        });
      }.bind(this));
    }
    addComment(e){
      e.preventDefault();
      var currTime = new Date();
      currTime = currTime.toLocaleString();  
      var commentContent = e.target.childNodes[0].value; 
      var key = Math.random();
      key = Math.round(key);    
      var newComment = {
        id: key,
        name: "Peter Paprika",
        date: currTime,
        thumb_picture:"/imgs/user-q.jpg",
        profile_link: "/user/123",
        content: commentContent,
        like_amount: 0
      };  
      var postsObj = this.state.posts;
      //console.log(postsObj[0].comments);   
      var newComments = postsObj[0].comments;
      newComments.push(newComment); 
      console.log(newComments);
      this.setState({posts: postsObj}); 
    }
    render() {
      return (
          &lt;div className="clearfix wrapper"&gt;
            &lt;Header /&gt;
            &lt;FeedOwnerColumn /&gt;
            &lt;FeedColumnRight posts={this.state.posts} addComment={this.addComment} /&gt;
            &lt;ReportBug /&gt;
          &lt;/div&gt;
      );
    }
  }
  
  
  export default FeedApp;
  </code></pre>
  
  <p>Unfortunately the <code>this.setState({})</code> in the <code>componentDidMount</code> method doesn't seem to get called correctly since there is no state update happening and my map functions which expect an array have nothing to do and return an error.</p>
  
  <p>The object which I want to use in the state update looks like this:</p>
  
  <pre><code>ownerChat: Object
  ownerDogs: Array[1]
  ownerInfo: Object
  ownerNotifications: Array[0]
  posts: Array[2]
  </code></pre>
  
  <p>I don't really know what else to try beside this method :/</p>