-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Animated spring callback not called immediately after the animation finishes #20783
Comments
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
Not sure if this has been fixed, would be good if one of the React Native team could clarify. |
@MarkOSullivan94 My guess is that there are still tiny bouncy movements ongoing which are difficult for a human to perceive but indeed not zero on Maths. So you may feel it already end but actually not. After a glance at the source code here, I guess that you may try to increase |
@sunnylqm @MarkOSullivan94 hmmm, I tried fiddling with |
With something like |
Spring animations take a long time to fully settle. You can't notice the animation during the end because it's too slow, but it's still happening. You should be able to verify this by adding Closing because it's not a bug. |
@MoOx You solution works pretty perfect in my case. Thank you! |
…ck could be trigger smoothly facebook/react-native#20783 (comment)
Environment
Environment:
OS: Linux 4.4
Node: 9.4.0
Yarn: Not Found
npm: 6.2.0
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found
Packages: (wanted => installed)
react: ^16.3.1 => 16.4.2
react-native: ^0.56.0 => 0.56.0
Description
This issue had been originally brought up back in 2015 but was never sorted #1951
There is a noticeable delay in the callback which is triggered after the animation ends, this is a major issue whenever you want to hide / show content once the animation is finished and so it would be great if this delay could be completely eliminated.
I have noticed that Animated.timing(...) does not have this delay after the animation has finished.
Reproducible Demo
I did try and get a expo snack demo working but wasn't able to.
Below is the code I use to setup the animation
Below is the callback trigger when the animation finishes.
The text was updated successfully, but these errors were encountered: