Class Component

About

A component in a Class representation

Syntax

class Welcome extends React.Component {

   // Optional. Needed to set state
  constructor(props) {
     super(props); // Always call the base constructor with props.
  }
  
  render() {
    return <h1>Hello, {this.props.name}</h1>;
  }
  
}

Feature available only to classes:

Task Runner