Creating component
When creating components, you have the choice between two different ways:
//Functional components
import React from 'react';
const person = () => {
return <p>I'm a Person!</p>
};
export default person;
//Class-based component
import React, { Component } from 'react';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<h1>Hi, I'm a React App</h1>
</div>
);
}
}