Components
Components
Extracting Components
Functional Components
function HelloWorld() {
return <h1>Hello world</h1>;
}
Alternatively, create a functional component with the arrow
function syntax(ES6).
function HelloWorld() {
return <h1>Hello World</h1>;
}
export default HelloWorld;