question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow animations on the `d` prop of the Path component.

See original GitHub issue

My use case is that I’m wrapping the Path component with createAnimatedComponent and then simply use react-native-reanimated (their createAnimatedComponent should be compatible to the react-native one)

I debugged the behavior a little bit and when using the wrapped component the app crashes because react-native-svg tries to render with _path = nil and then crashes. To be more detailed: Elements/RNSVGPath.m::setD is never called and then inRNSVGRenderable.m::renderLayerToit basically calls CFAutorelease with nil and crashes. I wonder if this related to a wrong or missing setNativeProps.

Anyone having a idea how to fix it.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
reneeichhorncommented, Jan 23, 2019

Wow that was fast 😄 Creating a tagged template was exactly my idea as well 👍

I think there is lots of potential with animated paths especially for charts etc.

2reactions
msandcommented, Jan 23, 2019

Also, wrote a small tagged template literal function:

function animatedString(strings, ...values) {
  const arr = [];
  const n = values.length;
  for (let i = 0; i < n; i++) {
    arr.push(strings[i], values[i]);
  }
  const end = strings[n];
  if (end) {
    arr.push(end);
  }
  return concat(...arr);
}

const path = animatedString`M0,0 L${x},${y}`;
Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow animations on the d prop of the Path component. #908
My use case is that I'm wrapping the Path component with createAnimatedComponent and then simply use react-native-reanimated (their ...
Read more >
useAnimatedProps | React Native Reanimated
The animatedProps property is added when a native component is wrapped with Animated.createAnimatedComponent . If the animated props worklet uses any shared ...
Read more >
CSS Motion Path - CSS: Cascading Style Sheets | MDN
Motion Path is a CSS module that allows authors to animate any graphical object along a custom path.
Read more >
Motion components | Framer for Developers
These work exactly like their static counterparts, but offer props that allow you to: Animate via a simple prop. Add drag, pan, hover...
Read more >
Managing and animating shape paths and masks in After Effects
You animate mask paths and shape paths in much the same way that you animate other properties: set keyframes for the Mask Path...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found