From d123bea8c1a4f1c977928fa2cfffe19132f74dab Mon Sep 17 00:00:00 2001 From: Eli White Date: Fri, 2 Aug 2019 13:53:49 -0700 Subject: [PATCH] Change Animated's Flow Type to require useNativeDriver be explicit Summary: We found that many callsites existed that could be using the native driver, but weren't. In order to help people use it when appropriate and eventually switch the default, we are requiring that useNativeDriver is explicit, even when set to false. For now, we are changing the flow type to turn this on at Facebook, but aren't making this a runtime warning until we have a bit more confidence in our plans so that we don't churn the community. Reviewed By: mdvacca Differential Revision: D16611301 fbshipit-source-id: dfa8536786fc949f0239118a9e0936b268b1081d --- Libraries/Animated/src/animations/Animation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Animated/src/animations/Animation.js b/Libraries/Animated/src/animations/Animation.js index 52301ff3902..d8a82ed502a 100644 --- a/Libraries/Animated/src/animations/Animation.js +++ b/Libraries/Animated/src/animations/Animation.js @@ -18,7 +18,7 @@ export type EndCallback = (result: EndResult) => void | Promise; export type AnimationConfig = { isInteraction?: boolean, - useNativeDriver?: boolean, + useNativeDriver: boolean, onComplete?: ?EndCallback, iterations?: number, };