1import React, { Component } from "react";
2
3class ClassComponent extends Component {
4 render() {
5 return <h1>Hello, world</h1>;
6 }
7}
8
1import React from "react";
2
3class ClassComponent extends React.Component {
4 render() {
5 return <h1>Hello, world</h1>;
6 }
7}
8
1import React from "react";
2
3const FunctionalComponent = () => {
4 return <h1>Hello, world</h1>;
5};
6