React笔记 2020-6-2

129 阅读1分钟

es6 import, export

//a.js 默认接口和普通接口
const foo=()=>'foo';
const bar=()=>'bar';
export default foo;
export {bar};

使用:
import foo,{bar} from '.a'