-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native Animated - Override __makeNative in AnimatedInterpolation #15077
Conversation
Summary: Fixes the error `Trying to update interpolation node that has not been attached to the parent` in android which occurs when using multiple Animated.Values along with interpolation and an animation is run before another one that uses interpolation. On ios, no error is thrown in such case but the animation also doesn't work as expected. You can check the snack code here which works properly without useNativeDriver: true. But fails on android and skips the first stage of animation on ios. https://snack.expo.io/HyD3zdjSZ **Test Plan** The animations worked properly after the __makeNative override made the parent node native as well.
Thanks for the fix! Looks good. |
@shergin has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Wow so timely, I just ran into this bug today. What version does this land in? |
Most likely 0.48. A quick hack into the |
@syaau thanks! Yep that's how I'm doing it. Very cool thanks! |
Hey all, I was wondering if I'm right here, this PR landed in v0.49.1? Is this correct? |
@Noitidart Yes, you can check the tags on the commit to know in which release it is in. |
Awesome thank you sir! |
Summary:
Fixes the error
Trying to update interpolation node that has not been attached to the parent
in android which occurs when using multipleAnimated.Values along with interpolation and an animation is run before
another one that uses interpolation. On ios, no error is thrown in such
case but the animation also doesn't work as expected.
You can check the snack code here which works properly without
useNativeDriver: true. But fails on android and skips the first stage
of animation on ios.
https://snack.expo.io/HyD3zdjSZ
Test Plan
The animations worked properly after the __makeNative override made
the parent node native as well.