So what's going on is we are assigning the named export Bar to that function, which is then being imported by the exact same name which allows static optimizations such as ES6 tree shaking. ![]() bar.js export const Bar = () => "Bar!" ![]() Now let's move on to named exports and imports. You are importing a default value which can be renamed to anything easily. Let's get started with default exports and imports. Before I get into how you don't know ES modules, let's review what you know about ES modules.
0 Comments
Leave a Reply. |