2

在我创建一个新项目后,我收到了这个警告

警告:DatePickerAndroid 已与 DatePickerIOS 合并,将在未来版本中删除。现在可以从“@react-native-community/datetimepicker”而不是“react-native”安装和导入它。见 https://github.com/react-native-community/react-native-datetimepicker

截屏

4

2 回答 2

1

是的,我也得到了那些。您可以放心地忽略它和其他一些类似的消息。看起来他们已经意识到这一点并正在修复: https ://github.com/GeekyAnts/vue-native-core/issues/239

于 2020-04-27T18:27:09.370 回答
0

在 Vue Native 项目中,开发环境中出现了 3 条警告消息。为了抑制这些,在 app.vue 文件中添加了以下代码:

import { LogBox } from "react-native";

然后在 created() 生命周期钩子中 -

created() {
    LogBox.ignoreLogs([
      'DatePickerIOS has been merged with DatePickerAndroid and will be removed in a future release.',
      'StatusBarIOS has been merged with StatusBar and will be removed in a future release.',
      'DatePickerAndroid has been merged with DatePickerIOS and will be removed in a future release.'
    ]);
  }
于 2020-10-26T11:16:25.217 回答