DEV Community

Discussion on: JavaScript debate : named imports VS default imports

Collapse
 
seanmclem profile image
Seanmclem

I'm starting to prefer named imports. Defaults seem to create inconsistentcy for me so I have been trying to avoid them lately.

Collapse
 
mindsers profile image
Nathanaël CHERRIER • Edited

Same feeling. I think a team must define some rules to be able to use default imports efficiently : what can we expect to have from a default import, etc. But the rules will change from a project to another.
Named imports allow to avoid having to defines those rules. It's easier to integrate a new dev on your team.