A functional component is a javascript function that may or may not receive props as an argument and returns the element that needs to be rendered. It is also known as a stateless component because it does not have its own state.
const ComponentName=()=>
{
return (
// JSX goes here
);
}
import React from 'react'
function MyComponent() {
return (
<div>Hello World!</div>
)
}
export default MyComponent