-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Description
- Review the documentation: https://facebook.github.io/react-native
- Search for existing issues: https://github.com/facebook/react-native/issues
- Use the latest React Native release: https://github.com/facebook/react-native/releases
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
let animation = Animated.timing(
this.state.animation,
{
toValue: finalValue,
}
);
animation.start(this._animationFinishCallback());
Below is the callback trigger when the animation finishes.
_animationFinishCallback = () => {
console.log("animationFinish");
};