【发布时间】:2020-05-31 06:35:36
【问题描述】:
I am trying an example with React Native and Typescript and for the following code:
<Image
style={{
width: 51,
height: 51,
resizeMode: 'contain',
}}
source={{ uri: portretPhoto }}
style={styles.uploadedImage}
resizeMode="contain"
/>
我得到错误: JSX 元素类型“HTMLImageElement”不是 JSX 元素的构造函数。 “HTMLImageElement”类型缺少“ElementClass”类型中的以下属性:render、context、setState、forceUpdate 和另外 3 个。
我该如何解决?
【问题讨论】: