'Export and export default a variable
What's the right way to do something like this? My goal is to have my list of things I'm exporting not have to be duplicated. Right now I have to make two lists of exports, one for the export, and one for the default export.
const exports = {
Something,
SomethingElse
}
export exports
export default exports
My goal is to be able to import like this:
import everything from 'my_module'
or
import {Something} from 'my_module'
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
