I understand that the super keyword can be used to call functions in the parent component. However, I donβt quite understand why you would use the super keyword in the example below - just passing it, regardless of whether the details are passed to the constructor.
Can someone shed light on the various reasons for using the super keyword in the constructor of the ES6 class, in response?
constructor(props) { super(props); this.state = { course: Object.assign({}, this.props.course), errors: { } }; this.updateCourseState = this.updateCourseState.bind(this); }
super ecmascript-6 reactjs
matthewalexander
source share