嘿,伙计们,我从typescript中得到了这个错误:Property does not exist on type 'IntrinsicAttributes & { children?: ReactNode; }',我导出了一个默认的接口,叫做iCustomer,我可以在我的项目中使用它。但现在我把它导入了CustomerViewList,因为我懒得在输入道具的时候重复我自己。
在那之后,我想导入视图并在我的平面列表上使用它,现在我得到了这个错误。

发布于 2021-04-18 04:52:40
Typescript告诉你CustomerViewList没有一个叫做"customerCode“的道具。看起来你已经定义了两个道具,customer和onPress。
您应该能够编写renderItem={({item}) => <CustomerViewList customer={item} onPress={onPress} /> }
https://stackoverflow.com/questions/67142673
复制相似问题