From a31c4c65d07a573de440f3a8a3d715a731485b85 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Tue, 25 Aug 2020 11:12:29 -0700 Subject: [PATCH] [fix] Remove Animated 'useNativeDriver' warning Fix #1693 --- .../react-native/Animated/NativeAnimatedHelper.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedHelper.js b/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedHelper.js index cd032c77..dde1c112 100644 --- a/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedHelper.js +++ b/packages/react-native-web/src/vendor/react-native/Animated/NativeAnimatedHelper.js @@ -262,20 +262,8 @@ function assertNativeAnimatedModule(): void { invariant(NativeAnimatedModule, 'Native animated module is not available'); } -let _warnedMissingNativeAnimated = false; - function shouldUseNativeDriver(config: AnimationConfig | EventConfig): boolean { if (config.useNativeDriver === true && !NativeAnimatedModule) { - if (!_warnedMissingNativeAnimated) { - console.warn( - 'Animated: `useNativeDriver` is not supported because the native ' + - 'animated module is missing. Falling back to JS-based animation. To ' + - 'resolve this, add `RCTAnimation` module to this app, or remove ' + - '`useNativeDriver`. ' + - 'More info: https://github.com/facebook/react-native/issues/11094#issuecomment-263240420', - ); - _warnedMissingNativeAnimated = true; - } return false; }