我有一个反应功能组件,像这样
const Strategy: React.FC<IFilteredProjectionTableProps> = props => {
....
...
}
export default Strategy;
以此方式将此FC分配为选项卡元素的组件属性
interface ITabInfo {
id: number;
name: string;
component: ReactElement;
}
const tabs: ITabInfo[] = [
{ id: 0, name: 'Board', component: <Board/> },
{ id: 1, name: 'Manager', component: <Manager /> },
{
id: 2,
name: 'Strategy',
component: <Strategy />
},
{ id: 3, name: 'New', component: <Create /> }
];
此FC对反应元素的分配引发此错误“类型'{}'缺少类型'IFilteredProjectionTableProps'的以下属性:......“
我在做什么错了?