useIsOnline
A hook to check if the user is online
Loading...
Installation
npx shadcn@latest add @shadcnhooks/use-is-onlineAPI
/**
* A hook to check if the network is online
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/online_event
* @returns A boolean indicating if the network is online
*/
export function useIsOnline(): booleanLast updated on