import React, {useEffect, useRef} from 'react'; import {Animated} from 'react-native'; import {Path, Svg} from 'react-native-svg'; const AnimatedPath = Animated.createAnimatedComponent(Path as any); type Props = { value: number; color: string; }; const Test2248 = ({value = 86, color = '#ED745F'}: Props) => { const animationValue = useRef(new Animated.Value(0)).current; useEffect(() => { const animatePath = () => { Animated.loop( Animated.timing(animationValue, { toValue: 1, duration: 2000, useNativeDriver: true, }), ).start(); }; animatePath(); return () => { animationValue.setValue(0); }; // eslint-disable-next-line react-hooks/exhaustive-deps }, []); return ( ); }; export default Test2248;