Skip to content

Stop using useDebounce and useThrottle inside other hooks #559

Closed

Description

@hyesungoh

useDebounce and useThrottle will be deprecated in #537, but six hooks still call them internally:

  • useDebouncedCallback, useDebouncedValue, useDebouncedState → useDebounce
  • useThrottledCallback, useThrottledValue, useThrottledState → useThrottle

A deprecated hook should not be what the rest of the family is built on. It also means these six cannot be cleaned up when the deprecated hooks are removed in a later major.

Make the six hooks use the debounce and throttle functions directly instead of the hooks. Each one then needs to keep the function stable across renders and cancel pending calls on unmount and when the timing options change, which useDebounce and useThrottle do for them today. If that logic ends up repeated, share it in an internal hook rather than a public one.

No public signature or behavior changes. Existing tests should pass as they are.

Waits for #537 and #558.

Activity

  1. mnxmnz commented on Oct 28, 2026

    @mnxmnz
    Member

    Resolved by #565 👍 The six hooks now share the debounce and throttle logic through internal hooks instead of the public useDebounce and useThrottle.

    Closing this manually, since #565 was merged into v1-base and GitHub only closes issues automatically on merges into the default branch. Where the internal hooks should live will be followed up in a separate issue. Thanks @Antoliny0919!

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

Metadata

Metadata

Assignees

No one assigned

    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