📅  最后修改于: 2022-03-11 15:02:15.740000             🧑  作者: Mango
import NetInfo from "@react-native-community/netinfo";
export default class NetworkUtils {
static async isNetworkAvailable() {
const response = await NetInfo.fetch();
return response.isConnected;
}}