Skip to content
aq-ui
Back to HooksHook

Use Stable Callback

Open-code aq-ui React hook for Use Stable Callback.

Installation

pnpm dlx aq-ui@alpha add use-stable-callback

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 { useStableCallback } from "@/hooks/use-stable-callback"

useStableCallback

functionSource L9

Open-code aq-ui React hook for Use Stable Callback.

function useStableCallback<T extends AnyFunction>(callback: T | undefined): (...args: Parameters<T>) => ReturnType<T> | undefined
Returns
(...args: Parameters<T>) => ReturnType<T> | undefined

Parameters

NameType
callbackT | undefined

Registry dependencies

use-latest

Files

  • hooks/use-stable-callback.ts

Source