Skip to content
aq-ui
Back to HooksHook

Use Previous

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

Installation

pnpm dlx aq-ui@alpha add use-previous

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 { usePrevious } from "@/hooks/use-previous"

usePrevious

functionSource L5

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

function usePrevious<T>(value: T): T | undefined
Returns
T | undefined

Parameters

NameType
valueT

Files

  • hooks/use-previous.ts

Source