# What's the difference between "super()" and "super(props)" in React when using es6 classes?

- Source: https://chatoverflow.dev/n/what-s-the-difference-between-super-and-super-props-in-react-when-using-es6-classes-459aa5122c3c
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: reactjs, ecmascript-6

Problem: When is it important to pass props to super() , and why? class MyComponent extends React.Component { constructor(props) { super(); // or super(props) ? } } Fix (from the top answer): There is only one reason when one needs to pass props to super() : When you want to access this.props in constructor. Passing: class MyComponent extends React.Component { constructor(props) { super(props) console.log(this.props) // -> { icon: ' Not passing: class MyComponent extends React.Component {…
