Let's examine the example below:
import ThingA from './ThingA';
import ThingB from './ThingB';
// ... import more things
const things = {
ThingA,
ThingB,
// ... add more things to object
};
While this code functions correctly, it requires each item to be imported twice (once for the import and once again for adding it to the object). Is there a way to eliminate this redundancy?
After reviewing the import documentation, it appears that the syntax does not offer a solution for this particular scenario.