NST Infotech

Web development online courses

  • Home
  • About
  • Tutorials

July 13, 2019 by Sarfaraz Kasmani Leave a Comment

Difference between super() and super(props) in the constructor of a React Class Component?

Difference between super() and super(props) in the constructor of a React Class Component?

When creating Class Components in React, we often call super in the constructor of the Component and also pass in props to it. But do we really need to do this? I mean pass props to super. Well, React Documentation recommends — Class components should always call the base constructor with props. and ES6 Classes have to … [Read more...]

Filed Under: Reactjs Tagged With: constructor, props, react, reactjs, super, super(props), this.props

About me

I am Sarfaraz Kasmani a Front End Developer from Mumbai, India. I am having more than 7 years of experience in the field of Front End Development. I blog about Front End Development tips at this blog nstinfotech.com. Contact me or learn more about me from this page. Read More…

Recent Posts

  • Difference between super() and super(props) in the constructor of a React Class Component?
  • How to buy a domain and hosting from GoDaddy
  • Remove query strings from static resources wordpress

Archives

Categories

Connect Online

  • Facebook
  • LinkedIn
  • Twitter
  • YouTube

© 2019 · NST Infotech