With ES6, I can import several exports from a file like this:
import {ThingA, ThingB, ThingC} from \'lib/things\';
However, I like the orga
Just a variation on the theme already provided in the answer, but how about this:
In a Thing
,
export default function ThingA () {}
In things/index.js
,
export {default as ThingA} from './ThingA'
export {default as ThingB} from './ThingB'
export {default as ThingC} from './ThingC'
Then to consume all the things elsewhere,
import * as things from './things'
things.ThingA()
Or to consume just some of things,
import {ThingA,ThingB} from './things'