I am beginner at React and I have seen different implementations for pages/components. Could you please clarify me the differences between the followings and pros/cons?
#1
const Home = () => {
...body
};
export default Home;
#2
export default function Home() {
...body
};
#3
export const Home = () => {
...body
}
#4
export function Home () {
...body
}
I am not sure if export default Home;
must be added to 3 or 4, but if so or there is an error, you can explain the missing parts. Any help would be appreciated.