Skip to content

Replace edges with leading and trailing in throttle hooks #534

Description

@hyesungoh

useThrottle and useThrottledCallback take edges: ('leading' | 'trailing')[], while useDebounce, useDebouncedCallback, useDebouncedValue and useThrottledValue take leading and trailing booleans. useThrottledValue even converts its booleans back into an array just to call useThrottle.

Replace edges with leading?: boolean and trailing?: boolean in both hooks, keep the current default of both enabled, and remove the conversion in useThrottledValue. Update types, docs, and tests.

Waits for #530.

Activity

  1. Antoliny0919 commented on Sep 29, 2026

    @Antoliny0919
    Contributor

    can i work on it ? 😁

  2. hyesungoh commented on Sep 30, 2026

    @hyesungoh
    MemberAuthor

    @Antoliny0919 please take this first 🙏

  3. mnxmnz commented on Oct 6, 2026

    @mnxmnz
    Member

    Landed in v1-base via #548 🙌

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