react-native-svg
react-native-svg copied to clipboard
"Expected transform function" error when using with Reanimated
Bug
When using react-native-svg with react-native-reanimated, animating SVG elements like Circle on the web results in a lot of console errors:
Error: <circle> attribute transform: Expected transform function, "undefined".
The animation itself works correctly.
Environment info
Library version: 13.9.0
Steps To Reproduce
- Create
SvgwithCircleand animate any of its properties
Snack example: https://snack.expo.dev/@helpling/happy-apple
Describe what you expected to happen:
The console.error should not be displayed
yup, I also have the same problem 🐰
I was having this issue with 13.9.0. Updated to 13.14.0 and errors are gone.
Same
@jjspierx Yeah. I updated my package to the latest, which resolves this issue.
But I get this warning, when using it with Expo.
@Karthik-B-06 this is fine as long as you're using development build (but will crash in Expo Go) and build your own dependencies. You can opt-out of the warning for this library.
@d4rky-pl Hey,
Here is an example showing correctly how we should use Reanimated. Additionally, I am sharing the Reanimated documentation with you.
@bohdanprog I am not entirely sure how this is supposed to be helpful but... thank you?
Looks fixed in the latest version, closing
@bohdanprog I am not entirely sure how this is supposed to be helpful but... thank you?
Case your example doesn't work?
@bohdanprog uh, yeah, that's usually what happens when you comment on an issue with a Snack from a year ago using an Expo version that is not supported by now 😅
The example worked in May 2023 and I know how to use the library, the bug has already been fixed.
I understand. I apologize for the lengthy response, but we are striving to do our best as we aim to improve. :)
Thank you for your response :)