Created
December 29, 2022 01:28
-
-
Save DoctorDerek/ec0654602d679a7e00f4fa305493873e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Default exports in JavaScript and TypeScript | |
function Banana() { | |
return <div>🍌</div> | |
} | |
const price = 1.33 | |
// In this example, price is a named export: | |
export { Banana as default, price } | |
// These are equivalent to the export syntax above: | |
export default function Banana() { | |
return <div>🍌</div> | |
} | |
export const price = 1.33 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment