Export {default} from'. / home'; what syntax is this? How do you understand it?

Today, I configured a project with nowaGUI, and I was a little confused when using this syntax, rookie. Only one export default home is used in
. / home to export a class.

how to understand this way of writing ~


is equivalent to

import Home from './home';

export default Home;

re-export-default-in-es-6-modules


module redirect


see if there is a default ?


this is the ES6 module import and export syntax. For more information, please take a look at Ruan Yifeng's document on es6 http://es6.ruanyifeng.com/-sharpdo.

.
Menu