Class Based Component is the JavaScript Class. In these Components we extends the JavaScript predefined class into our component.

BY Best Interview Question ON 13 Jan 2019

Example

Import React,{Component} from ‘react’;

class ABC extends Component {

 render(){

   return(

    <div>

       <h1>Hello World</h1>

</div>

);

}}

export default ABC;

Suggest An Answer