【发布时间】:2021-11-23 21:38:37
【问题描述】:
我在 React Native Expo 中有这个警告:AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. See https://github.com/react-native-async-storage/async-storage
我已经安装了@react-native-async-storage/async-storage 和expo install,但警告不会消失。
搜索我的文件显示没有结果 AsyncStorage 我做错了什么,请指教
"dependencies": {
"@react-navigation/native": "^6.0.6",
"@react-navigation/native-stack": "^6.2.5",
"expo": "~43.0.2",
"expo-firebase-recaptcha": "~2.0.2",
"expo-status-bar": "~1.1.0",
"firebase": "^9.5.0",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "~3.8.0",
"react-native-web": "0.17.1",
"react-native-webview": "11.13.0"
}
【问题讨论】:
-
如何导入以及如何调用它?
-
我没有在我的应用程序的任何地方使用它,我不明白警告来自哪里
-
删除节点模块:rm -r 节点模块。然后删除文件夹 expo 并再次运行 yarn 或 npm install
-
完成了,没有帮助,我仍然有警告
-
@DeonDazy 你介意列出你的应用程序的依赖项吗?
标签: firebase react-native expo