What's the difference between "super()" and "super(props)" in React when using es6 classes?
When is it important to pass props
to super()
, and why?
class MyComponent extends React.Component {
constructor(props) {
super(); // or super(props) ?
}
}