From f-rha-use-debounce
Use when the user wants to debounce a rapidly changing value (e.g. search input, resize events) to avoid excessive re-renders or API calls. Returns a delayed copy of the value that only updates after the specified delay.
How this skill is triggered — by the user, by Claude, or both
Slash command
/f-rha-use-debounce:use-debounceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Returns a debounced copy of a value that only updates after the given delay has passed without the value changing. Useful for search inputs, API calls, or expensive computations.
Returns a debounced copy of a value that only updates after the given delay has passed without the value changing. Useful for search inputs, API calls, or expensive computations.
const debouncedValue = useDebounce(value, delay);
| Parameter | Type | Default | Description |
|---|---|---|---|
value | any | — | The value to debounce |
delay | number | 300 | Delay in milliseconds |
The debounced value — same type as value, updated only after delay ms of inactivity.
import { useDebounce } from "f-rha";
import { useState, useEffect } from "react";
function Search() {
const [query, setQuery] = useState("");
const debouncedQuery = useDebounce(query, 400);
useEffect(() => {
if (debouncedQuery) fetchResults(debouncedQuery);
}, [debouncedQuery]);
return (
<input
value={query}
onChange={(e) => setQuery(e.target.value)}
placeholder="Search..."
/>
);
}
npx claudepluginhub dio-chu/f-rha-marketplace --plugin f-rha-use-debounceProvides framework-agnostic debouncing, throttling, rate limiting, queuing, and batching utilities via class APIs, factory functions, and React hooks for JS/TS apps.
Provides patterns and examples for React Hooks including useState, useEffect, useContext, useMemo, useCallback, and custom hooks for state management and side effects.
Provides React hooks reference with syntax, patterns for useState/useReducer state, useEffect side effects/cleanup, useRef/useContext, useMemo/useCallback optimization, React 19 hooks, custom hooks, and best practices.