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

Property 'Ripple' does not exist on type 'typeof TouchableNativeFeedback'.ts(2339)

$
0
0

I'm trying to create a button using TouchableNativeFeedback but I ran into an error. This is my code:

export const Button = ({props}: Props) => {  const [rippleColor, setRippleColor] = useState(primaryColor);  const [rippleOverflow, setRippleOverflow] = useState(true);  return (<TouchableNativeFeedback      onPress={onPress}      background={TouchableNativeFeedback.Ripple(rippleColor, rippleOverflow)}><View}>{children}</View></TouchableNativeFeedback> )}

With this code I got this error

Property 'Ripple' does not exist on type 'typeof TouchableNativeFeedback'.ts(2339)

Anyone knows what should I do? I've tried passing the rippleColor& rippleOverflow as props and sets the type on type Props = {} but it doesn't work either.


Viewing all articles
Browse latest Browse all 6287

Trending Articles



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