Why and when to use default export over named exports in es6 Modules?
问题 I have referred all the questions in stackoverflow. But none of the suggested why and when to use default export. I just saw that default can be metioned "When there is only one export in a file" Any other reason for using default export in es6 modules? 回答1: Some differences that might make you choose one over the other: Named Exports Can export multiple values MUST use the exported name when importing Default Exports Export a single value Can use any name when importing This article does a