React ES5 to ES6: props and state
Developing with React and ES5, state on a Component is configured using the getInitialState() function: var ButtonComponent = React.createClass({ getInitialState : function(){ return({ value1: this.props.value1, value2: this.props.value2 }); }, … }); If you’re moving from ES5 TO ES6 and creating React components using ES6 …