Skip to content

useNetwork ​

获取网络信息。

typescript
import { useNetwork } from '@uni-helper/uni-use'

const { type, isWifi, is2g, is3g, is4g, is5g, isEthernet, isUnknown, isOnline, isOffline }
  = useNetwork()

Released under the MIT License.