Reasons to break the rule: - Functions like React.lazy take a module as an argument, and you don't want to customize the function for each module. Use a default export. - You're importing many files at once, e.g. with a Webpack context. Use a default export.
-
-
Prikaži ovu nitHvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
Why are there less worries about naming? Named exports require naming, no?
-
Named exports require to name thing once. No worries about naming on usage.
- Još 2 druga odgovora
Novi razgovor -
-
-
- Less chaotic imports section. All imports starts with {
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
-
I’m not convinced... Generally I would have a default export per file, then if I need to export a group of files, I throw them in a folder and export each (export { default as Name } from ‘’) in an index file. This defines a more public module, defualt imports are nice internally
- Još 2 druga odgovora
Novi razgovor -
-
-
Yeah default export was a mistake :/
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.
たまに日本語