useNetwork

useNetwork is a custom hook to check the network status to determine if the user is connected to the internet or not.

The useNetwork hook returns an object with the following fields:

NameTypeDefaultDescription
onlineStatusbooleanTrue if the user is connected to the internet, false otherwise.
import { useNetwork } from 'minerva-ui';

Usage

Network Online