ES6 IMPORTS
Imports are handled differently in ES6 Modules than in CommonJS. We use import <name> from <file or package>
to import in ES6
Importing Named Exports
We import Named Exports
using curly braces
Also, when we are importing a JavaScript file, Create-React-App will automatically look for the extension. So there is no need to add it.
Importing Default Exports
We Import Default Exports
by giving a name of our choosing for the default export and then importing it from the file.
Aliases We also have the ability to create aliases on Named Exports.
Go to Exports to see how to export.
LINKS
Learning Objectives, (no answers)
Learning Objectives With Answers
Imports CheatSheet
Exports CheatSheet
Imports, Exports One-to-One
Last updated