为什么会这样:
const PostComponent = ({post}) => (
<span>
<div>{post.text}</div>
</span>
)
export default PostComponent;
而不是这个:
export default PostComponent = ({post}) => (
<span>
<div>{post.text}</div>
</span>
)
后者表示导入时组件未定义。