Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6290

Type '{ rippleColor: any; }' is not assignable to type 'ColorValue | null | undefined'

$
0
0

I am trying to learn reactnative(expo) with typescript and I have an issue where typescript shows me the following error Type '{ rippleColor: any; }' is not assignable to type 'ColorValue | null | undefined' while adding android_ripple color. How do I solve this?

my component

import { Pressable, Text, View } from "react-native";const Button = ({    rippleColor,    }) => {    return (<View><Pressable        disabled={disabled}        android_ripple={{ color: { rippleColor }, borderless: true }} //here is where typescript complains        onPress={onPress}><Text>          {text}</Text></Pressable></View>  );};

Viewing all articles
Browse latest Browse all 6290

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>