Does the import corresponding to es6 export default class have to introduce the same class name?

The introduction part corresponding to export default a
in

impression can be directly import. You can lead to this a, in which"." It can be any self-named variable,

when writing code today, suddenly notice:
export default class x extends React.Component {

When

is introduced, you must write import x. You can"t name it arbitrarily. It can only be a variable x. I feel confused.


import x as 

Yes.

clipboard.png


export default can customize the loading name, and export must have the corresponding name


import * as SomeName from './class';
.
Menu