I am trying to clear a components state but can\'t find a reference for the es6 syntax. I was using:
state
this.replaceState(this.getInitialState());
class MyComponent extends Component { constructor(props){ super(props) this.state = { inputVal: props.inputValue } // preserve the initial state in a new object this.baseState = this.state } resetForm = () => { this.setState(this.baseState) } }