mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-01 18:15:13 +00:00
-12
@@ -262,20 +262,8 @@ function assertNativeAnimatedModule(): void {
|
|||||||
invariant(NativeAnimatedModule, 'Native animated module is not available');
|
invariant(NativeAnimatedModule, 'Native animated module is not available');
|
||||||
}
|
}
|
||||||
|
|
||||||
let _warnedMissingNativeAnimated = false;
|
|
||||||
|
|
||||||
function shouldUseNativeDriver(config: AnimationConfig | EventConfig): boolean {
|
function shouldUseNativeDriver(config: AnimationConfig | EventConfig): boolean {
|
||||||
if (config.useNativeDriver === true && !NativeAnimatedModule) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user