Looking for reactjs Answers? Try Ask4KnowledgeBase
Looking for reactjs Keywords? Try Ask4Keywords

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