title: React Re-render on State Change
body: <pre><code>const Feed = React.createClass({
  getInitialState: function () {
   return {
    data: {}
   }
  },
  
  componentDidMount: function () {
  axios.all([
    getAllTeams(), getAllDrivers()
  ]).then((results) =&gt; {
      let teams = results[0].data;
      let drivers = results[1].data;
      let newDrivers = normaliseDrivers(drivers);
      var data = normaliseData(teams, newDrivers);
      this.setState({
        data: data
      })
    })
  },
  
  sortAndRenderPanels () {
  let teamsArr = Object.values(this.state.data);
  teamsArr.sort(function(a,b) {
    return (a.positions[0][2016] &gt; b.positions[0][2016])
      ? 1 : ((b.positions[0][2016] &gt; a.positions[0][2016])
      ? -1 : 0);
  });
  return teamsArr.map ((data, i) =&gt; {
    return (
        &lt;MyPanel
          key={i}
          data={data}
        /&gt;
    )
  })
  },
  
  sortAlphabeticallyAndRender () {
  let teamsArr = Object.values(this.state.data);
  var sorted = teamsArr.sort(function(a, b){
    var textA = a.name.toUpperCase();
    var textB = b.name.toUpperCase();
    return (textA &lt; textB) ? -1 : (textA &gt; textB) ? 1 : 0;
  });
  return sorted.map((data, i) =&gt; {
    return (
      &lt;MyPanel
        key={i}
        data={data}
      /&gt;
    )
   })
  },
  
  handleAlphabetClick (e) {
  e.preventDefault();
  this.sortAlphabeticallyAndRender(this.state);
  this.forceUpdate(function () {
    return this.state.data;
  });
  },
  
  render: function () {
  const cards = this.sortAndRenderPanels();
  return (
    &lt;div id="feed"&gt;
      &lt;Button id='sort-button' onClick={this.handleAlphabetClick} type="button" className="btn btn-warning" aria-label="Left Align"&gt;
        &lt;span &gt; Sort Alphabetically&lt;/span&gt;
      &lt;/Button&gt;
      {cards}
    &lt;/div&gt;
  )
  }
  });
  </code></pre>
  
  <p>On button Click I want to re-render the panels, to show in alphabetical order. I know my function to order them correctly works, and logs to the console with the data in the correct order, but I cannot seem to force an update to re-render the state.</p>