Reanimated 1.3.0 Node values are updated when they shouldn't
See original GitHub issueHello there.
As I mentioned in #415, after 1.3.0 upgrade my animation node values are updated even when another node value (in different component) is changed (and no state change is made). Whats worse, even when I push a new screen and then go back, origins screen nodes values are changed. But all these problems disappears when I remove diffClamp method.
It happens only on 1.3.0. When I downgraded back to 1.2.0 the issue dissapears.
Gif - Behvaiour on 1.3.0:
Gif - Behvaiour on 1.2.0 or without using diffClamp method:
I’m enclosing reproducible demo https://github.com/sebinq/react-native-reanimated-bug
Steps to reproduce:
- At HomeScreen, move any object just a little bit to any side.
- Change Screen using provided button.
- Go back to HomeScreen and you will see position is changed!
You can also see debug log in console that translation value was changed.
When you remove diffClamp in ‘components/Movable.js’ and try to use just withOffset, you can see that everything works fine!
Thank you so much for any help!
react-native 0.61.2
react-native-reanimated: 1.3.0
react-native-gesture-handler: 1.4.1
react-native-screens: 1.0.0-alpha.23
react-navigation-stack: 2.0.0-alpha.23
react-native-redash: 8.2.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:11 (5 by maintainers)
Top GitHub Comments
Thanks @sebinq for reporting and working on a repro case. It’s been really helpful in investigating this very obscure bug. Just submitted a fix and we will likely release it some time soon.
Also many thanks to @ShaMan123 for participating in the discussion and figuring out workarounds 🙌
@kmagiera you don’t even know how glad am I to hear this news 🥂 thank you so much!