I have quite a lot of experience with ES6 and imports, but I usually don't do imports and exports this way. I'm trying to understand what I'm overlooking here. I've done a lot of searching here, but no answers so far.
Exporting my function from File A
export default myNamedExport;
Exporting my imported function in File B
export myNamedExport from './FileA';
export someOtherNamedExport from './someFile';
Importing from File B into File C
import { myNamedExport } from './FileB';
But when I do this my import looks like this:
myNamedExport: {
myNamedExport,
someOtherNamedExport
}
I've tried this in at least 15 different configurations of various imports and exports including using default
and as
, but the outcome is always the same.
I would like to avoid importing everything and then re-exporting it in a default object, but what gives? Why is every configuration I use resulting in my function being within an object? Thanks for any ideas.