react-native-reanimated
react-native-reanimated copied to clipboard
Fix dynamically added/removed animated styles on iOS/Android
Summary
Fixes #5296.
-
Since this is potentially a JS-heavy fix, I'll gladly listen to suggestions and receive help with how to profile it.
-
I personally dislike how those changes look like. I would much more prefer to simplify some logic present in
createAnimatedComponent
and its devil spawn, reducing some code, instead of building on top of it - although I'm not sure if we need it at the moment.
Just watch the video to understand what is happening:
BEFORE (buggy) | AFTER (desired) |
https://github.com/software-mansion/react-native-reanimated/assets/40713406/07495711-a909-4499-89b8-a0be17f3d8ef |
https://github.com/software-mansion/react-native-reanimated/assets/40713406/47cbace1-bf98-4011-8b4c-79bc6f6a80d4 |
Test plan
💣
Note
JS-Reanimated (Web implementation) still has those issues and I will produce a separate solution for it in a finite amount of time.
Wanna add "closing #5296"?