Skip to content
aq-ui
Back to HooksHook

Use Throttled Value

Open-code aq-ui React hook for Use Throttled Value.

Installation

pnpm dlx aq-ui@alpha add use-throttled-value

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 { useThrottledValue } from "@/hooks/use-throttled-value"

useThrottledValue

functionSource L5

Open-code aq-ui React hook for Use Throttled Value.

function useThrottledValue<T>(value: T, interval = 250): T
Returns
T

Parameters

NameTypeDefault
valueT—
interval?—250

Files

  • hooks/use-throttled-value.ts

Source