import React from "react";
class App extends React.Component{
constructor(){
super();
this.state = {
};
};
render(){
return(
<>
<h1>Hello World</h1>
<h1>Hi</h1>
</>
);
};
};
export default App;
Points to remember:
- constructor is a function so syntax -> constructor(){}. Same for render(){}. And all other lifeCycle methods are called the similarly.
- render should return() something which is JSX.
Top comments (0)