use-network
Returns current connection status
Source
Docs
PackageIcon
Usage
The use-network hook returns an object with the current connection status:
| Property | Value |
|---|---|
| Online | Online |
| rtt | |
| downlink | |
| effectiveType | |
| saveData | false |
Browser support
use-network uses the experimental navigator.connection API. See the browser compatibility table.
Definition
Exported types
The UserNetworkReturnValue type is exported from the @mantine/hooks package;
you can import it in your application: