Default Exports vs Named Exports
{/* default example */}
function Fruit() {
return (
<h1>This is Fruit</h1>
)
}
export default Fruit;
{/* default example */}
export default function Fruit() {
return (
<h1>This is Fruit</h1>
)
}
{/* named example </a> */}
export const HelloWorld = () => console.log("Hello");
export const Foo = () => { return <h3>Bar</h3>};
import Fruit , { HelloWorld, Foo } from './pages/ExportsExample';