mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
8ba771c3dd
Summary: AnimatedValue fires a callback with the current value (raw value + offset) after calling it's `stopAnimation` method. The `_value` field on the `AnimatedValue` node is not necessarily kept in sync with the NativeAnimated value node, so the value provided to the callback may be out of sync. This change checks if the `AnimatedValue` is a native node and passes the callback to the `NativeAnimatedAPI.getValue` callback, defaulting to the previous current JS node state if the node is not native. Changelog: [General][Fixed] - AnimatedValue.stopAnimation callback with correct value for NativeAnimated Reviewed By: yungsters Differential Revision: D32968572 fbshipit-source-id: b83f86eabe5456f762a15bc29cacb43f84513f6c