JavaScript
1 flashcards · Programming Languages · by Prithwish Hati
What is export default?
Default exports are useful to export only a single object, function, variable. During the import, we can use any name to import. // In module.js let x = 4; export default x; // In test.js import y from './module'; While importing x, we used y in import statement as name doesn't matter in default export