6c80f886ae
Summary: This change fixes an issue with calling `setValue` for natively driven nodes. As of now an attempt to call this method from JS would trigger an error "Attempting to run JS driven animation on animated". That is because for natively animated nodes we don't allow for `setNativeProps` to be executed and method `_flush` is now responsible for triggering that call. To fix the issue we add extra flag to `_updateValue` method that indicates if we should be "flushing" updated values using `setNativeProps` and we pass an appropriate value depending on the status of the node (native/non-native). Note that in animation callback we always pass `true` - that is because natively driven animations will never call into that callback. **Test Plan** Run JS tests: `npm test Libraries/Animated/src/__tests__/AnimatedNative-test.js` Closes https://github.com/facebook/react-native/pull/7138 Differential Revision: D3257696 fb-gh-sync-id: 13ec26bc36b56b3208f4279a95532bbe60551087 fbshipit-source-id: 13ec26bc36b56b3208f4279a95532bbe60551087 |
||
---|---|---|
.. | ||
__tests__ | ||
polyfills | ||
Animated.js | ||
AnimatedImplementation.js | ||
AnimatedWeb.js | ||
Easing.js | ||
Interpolation.js | ||
NativeAnimatedHelper.js | ||
SpringConfig.js | ||
bezier.js |