React React.createClass vs extends React.Component

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

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.



Got any React Question?