React.createClass vs extends React.Component

Download reactjs eBook

Syntax

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

Remarks

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

Stats

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

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook