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.

Reanimated 1.3.0 Node values are updated when they shouldn't

See original GitHub issue

Hello 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:

Screen Recording 2019-10-07 at 11 02 14

Gif - Behvaiour on 1.2.0 or without using diffClamp method:

reanim1 2 0

I’m enclosing reproducible demo https://github.com/sebinq/react-native-reanimated-bug

Steps to reproduce:

  1. At HomeScreen, move any object just a little bit to any side.
  2. Change Screen using provided button.
  3. 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:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
kmagieracommented, Oct 31, 2019

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 🙌

1reaction
sebqqcommented, Oct 31, 2019

@kmagiera you don’t even know how glad am I to hear this news 🥂 thank you so much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native-reanimated - npm
Clock node is a special type of Animated.Value that can be updated in each frame to the timestamp of the current frame. When...
Read more >
Error: Unable to resolve module `react-native-gesture-handler`
You need to install react-native-gesture-handler as well separately in the project dependency list and link it too with native as well.
Read more >
react-navigation-drawer - UNPKG
301, this.currentOpenValue = open; ; 302 ; 303, // Without this check, the drawer can go to an infinite update <-> animate loop...
Read more >
a problem occurred evaluating project ':react-native-gesture ...
I tried updating react-native-reanimated version to 3.0.0-rc.0 still it's not working for me. My package.json:.
Read more >
expo | Yarn - Package Manager
The expo package is a single package you can install in any React Native app to begin using Expo modules. includes core infrastructure...
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