Creating React components
Class components
import React from 'react'
export default class HelloWorld extends React.Component {
render() {
return <h1>Hello world!</h1>;
}
}
Functional components
import React from 'react'
export default function HelloWorld(){
return <h1>Hello world!</h1>
}