在我的abc.js中,我已经拆分了组件
export const BlockA = () => <div>Block A</div>
export const BlockB = () => <div>Block B</div>
const ABCComponent = () => (
<div>
<BlockA/>
<BlockB/>
</div>
)
export default ABCComponent
然后在另一个文件中,说它是xyz.js我想使用来自abc.js的BlockA组件,我做
import { BlockA } from './abc.js'
我收到了...does not contain an export named 'BlockA'.
的错误?有什么线索的原因?