Animate an SVG object along a line or a path with React Native

220 Views Asked by At

Can someone help how to do it in React Native with reanimated and redash?

I was trying to do it this way, but the app crashes everytime.

  const AnimatedCircle = Animated.createAnimatedComponent(Circle);
  const circleAnimation = useAnimatedProps(() => {
    const path = parsePath(d);
    const { cx, cy } = getPointAtLength(path, length * progress.value);
    return {
      cx,
      cy,
    };
  });```
0

There are 0 best solutions below