Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate useDebounce in favor of the version in @wordpress/compose #250

Open
kevinfodness opened this issue Jun 23, 2023 · 4 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers javascript Requires understanding JavaScript typescript Requires understanding TypeScript

Comments

@kevinfodness
Copy link
Member

kevinfodness commented Jun 23, 2023

User Story

As a package maintainer, I want to use the debounce functionality provided by WordPress rather than relying on a third party library.

Acceptance Criteria

  • Deprecate the custom useDebounce hook in Block Editor Tools (print a console warning when it is called the first time) and instruct users to migrate to useDebounce from @wordpress/compose instead.
  • Update documentation to indicate that this hook has been deprecated and indicate that it will be removed in a future version.
@renatonascalves
Copy link
Contributor

@renatonascalves
Copy link
Contributor

One can use as such:

import { useDebounce } from '@wordpress/compose';

@kevinfodness
Copy link
Member Author

Fantastic, that's even better. I'll update the issue to reflect that.

@kevinfodness kevinfodness changed the title Deprecate useDebounce in favor of @uidotdev/usehooks Deprecate useDebounce in favor of the version in @wordpress/compose Aug 21, 2023
@renatonascalves
Copy link
Contributor

Just a note that, the way the hook from WordPress works is different from the version here and from @uidotdev. So it is not a 1:1 replacement.

@kevinfodness kevinfodness added javascript Requires understanding JavaScript typescript Requires understanding TypeScript good first issue Good for newcomers labels Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers javascript Requires understanding JavaScript typescript Requires understanding TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants