在我的打字稿/ reactjs应用程序我想在这样的属性称为测试通过,这是index.tsx的一部分:如何解决打字稿错误TS2339:属性'XXX'不存在类型'IntrinsicAttributes&...?
ReactDOM.render(
<Provider store={getStore()}>
<BrowserRouter>
<App test={1} />
</BrowserRouter>
</Provider>,
document.getElementById('content')
);
在我app.tsx我:
export class App extends React.Component<any,{}>{
constructor(props){
super(props);
}
render(){
..
}
}
当我运行应用程序,我得到这个错误:
ERROR in ./src/index.tsx
(24,12): error TS2339: Property 'test' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Component<{}, ComponentState>> & Readonly<{ childr...'.
我怎样才能确保这个错误得到解决或者我怎么能在财产传给我的应用程序组件?