Reactjs 导入组合组件时出现Typescript导入错误

Reactjs 导入组合组件时出现Typescript导入错误,reactjs,typescript,redux,redux-firestore,Reactjs,Typescript,Redux,Redux Firestore,当我尝试导入reduxcompose组件时,我遇到了一个奇怪的导入错误, 我不知道是什么原因造成的,我已经为相关软件包安装了所有最新的@types: 错误: JSX元素类型“PostTable”没有任何构造或调用签名。 父母亲 从“React”导入React; 从“react bootstrap”导入{Container,Row,Col}; 从“../postings/CreatePost”导入CreatePost; 从“../postings/PostTable”导入PostTable; 导出

当我尝试导入redux
compose
组件时,我遇到了一个奇怪的导入错误, 我不知道是什么原因造成的,我已经为相关软件包安装了所有最新的
@types

错误:

JSX元素类型“PostTable”没有任何构造或调用签名。

父母亲
从“React”导入React;
从“react bootstrap”导入{Container,Row,Col};
从“../postings/CreatePost”导入CreatePost;
从“../postings/PostTable”导入PostTable;
导出默认值(props:{[key:string]:any})=>{
返回(
//这里发生错误
);
};
小孩
从“React”导入React;
从'react redux'导入{connect};
从'redux'导入{compose};
从“react-redux firebase”导入{firestoreConnect};
const PostTable=(props:{[key:string]:any})=>{
返回(
#
弗斯特
最后
{props.posts.map((post:{[key:string]:any})=>{
返回(
{post.id}
{post.title}
{post.content}
);
})}
);
};
const-mapStateToProps=(状态:{[key:string]:any})=>{
返回{
帖子:state.firestore.ordered.posts,
};
};
导出默认组合(
连接(MapStateTops),
firestoreConnect([
{
收集:"帖子",,
},
])
)(可张贴);

只是好奇,如果在父组件中执行
导出const PostTable=…
然后从“…”导入{PostTable},是否会出现相同的错误?@3066d0是的,我尝试了这两种方法,它们都给了我相同的错误解决方案可以在这里找到: