From aeffa86a8c3a2024f8954d9a63b7e234e3d3aa6d Mon Sep 17 00:00:00 2001 From: Vladislav Pilgasov Date: Fri, 30 Mar 2018 20:57:42 -0700 Subject: [PATCH] Add an implementation of Animated.subtract Summary: Fixes #18451 I've added another example to NativeAnimationsExample, which makes use of `Animated.substract()`, let me know if the example is not desired / doesn't add much value. Below two GIFs of the new method working on iOS and Android: https://github.com/facebook/react-native-website/pull/276 [GENERAL] [ENHANCEMENT] [Animated] - Implemented Animated.subtract Closes https://github.com/facebook/react-native/pull/18630 Differential Revision: D7462867 Pulled By: hramos fbshipit-source-id: 4cb0b8af08bb0c841e44ea2099889b8c02a22a4a --- js/NativeAnimationsExample.js | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/js/NativeAnimationsExample.js b/js/NativeAnimationsExample.js index 983b0c9d290..5a6e5df55e8 100644 --- a/js/NativeAnimationsExample.js +++ b/js/NativeAnimationsExample.js @@ -429,6 +429,48 @@ exports.examples = [ ); }, }, + { + title: 'Multistage With Subtract', + render: function() { + return ( + + {anim => ( + + )} + + ); + }, + }, { title: 'Scale interpolation with clamping', render: function() {