为何设置了 useNativeDriver 仍然有警告?

来源:11-9 手势响应系统(2)

香饽饽0

2020-05-29

backend.js:32 Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false` 
    in LinearAnimatedGradientTransition (at TobTabBarWrapper.tsx:34)
    in TopTabBarWrapper (at HomeTabs.tsx:21)
    in Pager (created by TabView)
    in TabView (at MaterialTopTabView.tsx:48)
    in MaterialTopTabView (at createMaterialTopTabNavigator.tsx:41)
    in MaterialTopTabNavigator (at HomeTabs.tsx:28)
    in HomeTabs (at SceneView.tsx:98)
    in SceneView (at useDescriptors.tsx:125)
    in BottomTabView (at createBottomTabNavigator.tsx:41)
    in BottomTabNavigator (at BottomTabs.tsx:62)
    in BottomTabs (at SceneView.tsx:98)
    in SceneView (at useDescriptors.tsx:125)
    in CardContainer (at CardStack.tsx:561)
    in CardStack (at StackView.tsx:418)
    in KeyboardManager (at StackView.tsx:416)
    in Context.Consumer (at StackView.tsx:414)
    in StackView (at createStackNavigator.tsx:82)
    in StackNavigator (at navigator/​index.tsx:62)
    in Navigator (at src/​index.tsx:16)
    in _default (at renderApplication.js:45)
写回答

1回答

今朝

2020-06-02

在RN版本0.62.0以上useNativeDriver属性是必填的了,在之前的版本中,这个属性是选填的

0
0

跨平台应用ReactNative+TypeScript仿喜马拉雅开发App

从入门到实战,掌握用TypeScript开发ReactNative应用

832 学习 · 339 问题

查看课程