How to write a functional component in React

Component
By Jad Joubran · 
Last updated Jan 28, 2020
import React from "react";

function MyComponent() {
  return <h1>This is a functional component</h1>;
}