'Background Clip not working in react native

        <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?



Solution 1:[1]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vasyl Nahuliak