Setting state
"We might need to update the initial state based on some user events. Updating state is also easy using the setState()
function." informed Mike.
var App = React.createClass({ getInitialState: function() { return { changeSets: [], headings: ['Updated At', 'Author', 'Change'] }; }, handleEvent: function(data) { this.setState({ changeSets: data.changeSets }); }, render: function(){ … });