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