Add useDebouncedState and useThrottledState #538
Copy link
Copy link
Closed
Description
The debounce and throttle families have Value and Callback hooks but no State hook. With a State hook, each family covers the three ways to own the state: the hook owns it (*State), the caller passes a value (*Value), or the caller passes a function (*Callback).
Add useDebouncedState and useThrottledState. Each takes an initial value, debounceMs or throttleMs, and the same leading and trailing options as the rest of its family, and returns the current value with a debounced or throttled setter. Follow the return shape that #528 lands on for state hooks with a single setter. Add docs and tests.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
Antoliny0919 commentedon Sep 30, 2026
can i work on it ? 😁
hyesungoh commentedon Oct 8, 2026
Thanks ! @Antoliny0919