萨拉姆
在更新react本机出现后,出现此错误。
Warning: NetInfo 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-community/netinfo'
instead of 'react-native'.
See https://github.com/react-native-community/react-native-netinfo
发布于 2019-05-25 00:16:35
npm install --save @react-native-community/netinfo
react-native link @react-native-community/netinfo
并改变这一点
import { NetInfo } from "react-native";
至:
import NetInfo from "@react-native-community/netinfo";
https://stackoverflow.com/questions/56303038
复制相似问题