Typescript 财产';客户代码';不存在于类型';内在的颂词;道具及;{children?:ReactNode;}';

Typescript 财产';客户代码';不存在于类型';内在的颂词;道具及;{children?:ReactNode;}';,typescript,react-native,Typescript,React Native,嘿,伙计们,我从typescript中得到了这个错误:属性在类型“IntrinsicAttributes&{children?:ReactNode;}”上不存在。 我导出一个名为iccustomer的默认界面,我可以在整个项目中使用它。但现在我在CustomerViewList上导入了它,因为我在键入道具时懒得重复自己的操作 之后,我想导入视图并在平面列表中使用它,现在有点出错了 Typescript告诉您CustomerViewList没有名为“customerCode”的道具。看起来您已经定

嘿,伙计们,我从typescript中得到了这个错误:
属性在类型“IntrinsicAttributes&{children?:ReactNode;}”上不存在。
我导出一个名为
iccustomer
的默认界面,我可以在整个项目中使用它。但现在我在
CustomerViewList
上导入了它,因为我在键入道具时懒得重复自己的操作

之后,我想导入视图并在平面列表中使用它,现在有点出错了


Typescript告诉您CustomerViewList没有名为“customerCode”的道具。看起来您已经定义了两个道具,
customer
onPress

你应该会写作
renderItem={({item})=>}

它告诉您CustomerViewList没有名为“customerCode”的属性。看起来你已经定义了两个道具,
customer
onPress
你应该能够编写
renderItem={({item})=>}
你能重写一个正确的答案让我接受吗?它是有效的。为子孙后代移动它:+1: