Why does the animation effect I set always have no effect when I click it for the first time? and What is the typescript of ref binding animation in react native?
const Test = () => { const messRef: any = React.useRef(new Animated.Value(0)).current; const [show, setShow] = React.useState<boolean>(false); return (<View><Animated.Text onPress={() => { Animated.timing(messRef, { toValue: show ? 200 : 0, duration: 1000, useNativeDriver: false, }).start(); setShow(!show); }} style={{ color: messRef.interpolate({ inputRange: [0, 100], outputRange: ["orange", "blue"], }), }}> Everything you do in life stems from either fear or love</Animated.Text></View> );};