React.createClass vs extends React.Component

Download reactjs eBook


  • Case 1: React.createClass({ })
  • Case 2: class MyComponent extends React.Component { }


React.createClass was deprecated in v15.5 and expected to be removed in v16. There is a drop-in replacement package for those that still require it. Examples using it should be updated.

Related Examples


1948 Contributors: 6
Wednesday, June 28, 2017
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial:

Download eBook