Size0.25 kbView sourceuseIsOnlineTrack the online state of the browser.Installation npmpnpmyarnbunnpm install @1hook/use-is-online Usage import { useIsOnline } from '@1hook/use-is-online' Check if the browser is online: const isOnline = useIsOnline()useIsHydratedOnce `true`, no hydration error can occur.useLatestRefTransform anything into a ref. The ref is always up to date in effects and DOM events.