Loading…

What are Class Based Component?

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

Example

                                        

Import React,{Component} from ‘react’;

class ABC extends Component {

 render(){

   return(

    <div>

       <h1>Hello World</h1>

</div>

);

}}

export default ABC;

Suggest An Answer

No suggestions avaliable!

Latest post from React js interview questions

Ask Question