From e173f14b525c41bd33b5256cc70e2e883d3d07e1 Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Fri, 4 Nov 2016 20:18:21 -0700 Subject: [PATCH] Use native animations if the animated value is native in NavigationCardStackPanResponder Summary: Since native and non-native animations do not work together check if the animated value is native and set useNativeDriver accordingly. So untill we move to always using the native driver this is needed. This and another fix in NativeAnimations module will allow using native animations to transitions with gestures. **Test plan** Tested in an app that uses native driven animations with a back gesture. This also needs #10643 and #10642 for everything to work properly. Closes https://github.com/facebook/react-native/pull/10641 Differential Revision: D4135972 Pulled By: ericvicenti fbshipit-source-id: 8e65574ebb296da044f4d03bf1eedee4a37ebdac --- .../NavigationExperimental/NavigationCardStackPanResponder.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/CustomComponents/NavigationExperimental/NavigationCardStackPanResponder.js b/Libraries/CustomComponents/NavigationExperimental/NavigationCardStackPanResponder.js index ba8a99519..c115f1ed7 100644 --- a/Libraries/CustomComponents/NavigationExperimental/NavigationCardStackPanResponder.js +++ b/Libraries/CustomComponents/NavigationExperimental/NavigationCardStackPanResponder.js @@ -206,6 +206,7 @@ class NavigationCardStackPanResponder extends NavigationAbstractPanResponder { { toValue: props.navigationState.index, duration: ANIMATION_DURATION, + useNativeDriver: props.position.__isNative, } ).start(); }