Class components and migration
Component
Base class for class components; render describes UI from props, state and context. Class components remain supported.
Formal Syntax & Structure
react syntaxreact
class Card extends React.Component { render(){ return <p>{this.props.name}</p>; } }Working Example
Example Snippetreact
class Card extends React.Component { render(){ return <p>{this.props.name}</p>; } }