use-network
Returns current connection status
Import
Source
Docs
Package
Usage
use-network
hook returns an object with current connection status:
Property | Value |
---|---|
Online | Online |
rtt | |
downlink | |
effectiveType | |
saveData | false |
Browser support
use-network
uses experimental navigator.connection
, see browser compatibility table.