我在打字稿中有以下代码。当我运行它时,出现以下错误:
错误 TS2339:类型“IntrinsicAttributes & IntrinsicClassAttributes> & Read...”上不存在属性“sytle”。
import React, { SFC } from 'react'
import { Image, StyleSheet } from 'react-native'
const logo = require('../../assets/Logo.png') // tslint:disable-line:no-var-requires
export const NamedLogo: SFC<any> = () =>
<Image
source={logo}
sytle={styles.logo}
/>
const styles = StyleSheet.create({
logo: {
width: 88,
height: 42
}
})
如何在打字稿中的 SFC 中玷污样式?
检查您的拼写style
。你在那ÿ TLE
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句