In React, a functional components can be written in two ways:
//Regular Function
function FunctionName(props) {
return <div />;
}
//OR
//Arrow Function
const FunctionName = (props) => {
return <div />;
}
In React, a functional components can be written in two ways:
//Regular Function
function FunctionName(props) {
return <div />;
}
//OR
//Arrow Function
const FunctionName = (props) => {
return <div />;
}