Class based components in react

We use class keyword to create a class based component in React. Below example shows how to create a class based component. Just create render() method in the class and you have a class based component up and running!

class User extends React.Component {
  render() {
    return <h2>This is a User component based on Class</h2>;
  }
}
Complex problems, Simple Solutions