📜  如何找到网络没有网络反应本机 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:15.740000             🧑  作者: Mango

代码示例1
import NetInfo from "@react-native-community/netinfo";
export default class NetworkUtils {
  static async isNetworkAvailable() {
    const response = await NetInfo.fetch();
    return response.isConnected;
}}