Default Export
noun
say it: “dih-FAWLT EK-sport” /dɪˈfɔːlt ˈɛkspɔːrt/
The one main value a module shares with export default, which another file imports without curly braces under any name it picks.
What is Default Export in JavaScript?
Default Export — The single value a module marks as its default export.
export default function total(price, quantity) {
return price * quantity;
}
In a sentence
- “The Recipe class is the file's default export, so I brought it in with import Recipe from "./recipe.js".”
Level: Journeyman · More JavaScript terms at this level
Updated