DEV Community


Discussion on: JavaScript Module Cheatsheet 📄‬

carlosnufe_97 profile image
Carlos Núñez

Perhaps you could add the use case for export/import at the same time.

i.e export { named } from 'path/module'

samanthaming profile image
Samantha Ming Author

Oh! Like including the actual path...yes! I had an earlier comment on this. Totally see how that’s way better...I’ve made a note to update this code note. Thank you for pointing it out! I like it, cause it helps me
Improve my code notes 😊👏

wh0am1 profile image
Carlos Aguilar

You can also re-export a default import.
It's already implicit, given the list already points the imported.default thing, but I think it's special enough to be included:

export { default as anyName } from 'path/module'
Forem Open with the Forem app