Skip to content

Add useDebouncedState and useThrottledState #538

Closed

Description

@hyesungoh

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.

Activity

  1. Antoliny0919 commented on Sep 30, 2026

    @Antoliny0919
    Contributor

    can i work on it ? 😁

  2. hyesungoh commented on Oct 8, 2026

    @hyesungoh
    MemberAuthor

    Thanks ! @Antoliny0919

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions