Hooks/State Management/useTimeout

useTimeout

A custom React hook to manage timeout functionality.

Example

Loading...

Install

npx shadcn@latest add https://unlogg.com/r/use-timeout.json
pnpm dlx shadcn@latest add https://unlogg.com/r/use-timeout.json
bunx shadcn@latest add https://unlogg.com/r/use-timeout.json

Notes

  • Provides a simple way to manage timeout functionality.
  • Includes functions to set the timeout duration and trigger the timeout.

API Reference

Parameters

PropTypeDefault
delay
number | null
-
callback
() => void
-