I've been diving into learning reactnative (expo) with typescript, but I've hit a roadblock. TypeScript keeps showing me the error message
Type '{ rippleColor: any; }' is not assignable to type 'ColorValue | null | undefined'
when I try to add the android_ripple color. How can I go about resolving this issue?
This is my component:
import { Pressable, Text, View } from "react-native";
const Button = ({
rippleColor,
}) => {
return (
<View>
<Pressable
disabled={disabled}
android_ripple={{ color: { rippleColor }, borderless: true }} //this is where TypeScript throws an error
onPress={onPress}
>
<Text>
{text}
</Text>
</Pressable>
</View>
);
};