Component

Advertisement

React provides the class Component.

We can create class component.

E.g.


import React, { Component } from 'react';

class Welcome extends Component {
	render() {
		return <h1>Hello World</h1>
	}
}

function App() {
	return <Welcome />
}

export default App;
%d bloggers like this: