<Text style={styles.text}>text</Text>
const styles = StyleSheet.create({
text: {
backgroundImage: "path-to-image",
WebkitBackgroundClip: "text",
backgroundClip: "text",
color: "transparent"
}
});
it say 'Invalid props.style key supplied to Text`
What am i doing wrong? What it should be?
React Native doesn't have background-clip
property https://reactnative.dev/docs/text-style-props
Use instead React Native MaskedView https://www.npmjs.com/package/@react-native-community/masked-view
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.