默认保留 React 再分别暴露Component 所以可以写 import React, {Component} from 'react'
const React = {a: 1, b:2}!!! 不是因为es6的解构赋值
export class Component {}
React.Component = Component
export default React
默认保留 React 再分别暴露Component 所以可以写 import React, {Component} from 'react'
const React = {a: 1, b:2}!!! 不是因为es6的解构赋值
export class Component {}
React.Component = Component
export default React
本文标题:es6 导出 export
本文链接:https://www.haomeiwen.com/subject/lexoqltx.html
网友评论