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.
Waits for #532 and #534.
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
useDebouncedStateanduseThrottledState. Each takes an initial value,debounceMsorthrottleMs, and the sameleadingandtrailingoptions 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.Waits for #532 and #534.