DEV Community

Discussion on: JavaScript Modules: From IIFEs to CommonJS to ES6 Modules

Collapse
 
somascope profile image
Scott

Thanks for this great explanation of modules! One question that I wondered about was the mixed used case of a module having named exports as well as a default export. Is that common, or are there reasons to avoid both types of exports in a module?

It might be helpful to indicate that default exports can only exist once per module. I know that's confused some people when creating modules while learning to do so.