Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix setValue to work properly on natively driven nodes
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 #7138 Differential Revision: D3257696 fb-gh-sync-id: 13ec26bc36b56b3208f4279a95532bbe60551087 fbshipit-source-id: 13ec26bc36b56b3208f4279a95532bbe60551087
- Loading branch information