React Tutorial:

React.createClass vs extends React.Component


  • 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.

React React.createClass vs extends React.Component Examples:

Related React Tutorial Topics:

Other Tutorial Topics:

This modified content is an extract of the original Stack Overflow Documentation released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow. This topic was created and modified by the Stack Ovedrflow Contributor.