Skip to content
aq-ui
Back to HooksHook

Use Online

Open-code aq-ui React hook for Use Online.

Installation

pnpm dlx aq-ui@alpha add use-online

API reference

Client module

Import the parts you need, then jump to an export for its contract.

View full source

Quick start

"use client"

import { useOnline } from "@/hooks/use-online"

const result = useOnline()

useOnline

functionSource L33

Open-code aq-ui React hook for Use Online.

function useOnline(defaultValue = true): boolean
Returns
boolean

Parameters

NameDefault
defaultValue?true
const result = useOnline()

Files

  • hooks/use-online.ts

Source