React Express

Imports and Exports
Imports and Exports
ES2015 provides a more advanced module importing/exporting pattern than the widely used CommonJS pattern. By contrast to the old module.exports = {...}, we can now export multiple named values. Similarly, we can import multiple named values.
There is one default export per file, and this exported value can be imported without refering to it by name. Every other import and export must be named.
If you attempt to import an older CommonJS module using the new import syntax, Babel will handle the difference in format automatically at runtime. An old-style module won't have the special __esModule property added by Babel upon export.
The imports in the previous example would be available if exported from the module react as in the next example.
For full details on the importing/exporting syntax, see the MDN reference for import and export.