【问题标题】:Error when switching scenes React native router flux切换场景时出错反应原生路由器通量
【发布时间】:2020-07-20 09:21:11
【问题描述】:

我目前正在使用 React Native 路由器 Flux 开发 React Native 应用程序,并且在切换场景时收到错误消息。

[Mon Jul 20 2020 10:14:47.942]  ERROR    currentlyFocusedField is deprecated and will be removed in a future release. Use currentlyFocusedInput 
Transitioner@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:115890:36
StackView@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:111907:36
Navigator@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:102007:38
KeyboardAwareNavigator@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:106488:38
NavigationContainer@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:105963:38
App@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:99452:36
Router@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:99597:30
App
RCTView
RCTView
AppContainer@http://localhost:8081/index.bundle?platform=android&dev=true&minify=false:67802:22

我似乎无法在谷歌上找到任何关于此的信息。目前它似乎不会导致应用出现任何问题,但想尝试找出导致此问题的原因,以防万一。

谢谢

【问题讨论】:

  • 你的rnrf 版本和react-navigation 版本是什么? rnrf 仅支持 react-navigation v4.x!如果您使用的是 v5 可能会导致问题。
  • @react-navigation/native": "^5.7.0", "react-native-router-flux": "^4.0.0",

标签: javascript android react-native react-native-router-flux


【解决方案1】:

我想,你使用的是 react-native 0.63.1 的新版本。 在新版本的 react-native-router-flux 上,这个问题将得到解决。目前,我忽略了这个问题。

import { LogBox } from 'react-native';

LogBox.ignoreLogs(['currentlyFocusedField is deprecated']);

【讨论】:

  • 我尝试使用它,但每当我切换场景时仍会显示错误消息
猜你喜欢
  • 2017-03-31
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-01-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多