React Native Error: Attempting to run JS driven animation on animated node that has been moved to "native" earlier by starting an animation

React Native Error: Attempting to run JS driven animation on animated node that has been moved to "native" earlier by starting an animation

我正在使用 0.61.4 版本的 React Naive,我发现这是一个奇怪的问题。

当专注于 TextInput(使用默认属性)时,我收到以下错误:

Attempting to run JS driven animation on animated node that has been moved to "native" earlier by starting an animation with useNativeDriver: true

注意:当输入位于页面下半部分时,会出现此问题。

我在 android React 版本 0.62.2 上遇到了同样的问题 来自 react-native-material-bottom-navigation 包

的底部导航

然后我:

  • 前往节点模块
  • 目标 react-native-material-bottom-navigation 文件夹
  • 在所有 JS 文件中搜索使用 useNativeDriver 的地方
  • 在它之前添加了这一行 :useNativeDriver: true

正如这条评论所推荐的那样,效果非常好