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

feat(use-debounce): create useDebounce composable to deprecate Debounce decorator #1475

Merged
merged 5 commits into from
May 22, 2024

Conversation

joseacabaneros
Copy link
Member

  • Create useDebounce composable to deprecate Debounce decorator
  • Deprecate rest of decorators too

Next step: Refactor components where decorator is used in favour of useDebounce composable

  • Dependencies. If any, specify: EMP-4087

Type of change

  • Vue 3 migration

What is the destination branch of this PR?

  • Main

How has this been tested?

const fn = (enabled: boolean, index: number) => {
  console.log(enabled);
  console.log(index);
  return enabled;
};
const debouncedFn = useDebounce(fn, 500, { trailing: true });
debouncedFn(true, 2);

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review on my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@joseacabaneros joseacabaneros force-pushed the EMP-4087-debounce-composable branch from abbf64f to e35f3dc Compare May 20, 2024 15:37
diegopf
diegopf previously approved these changes May 21, 2024
Copy link
Contributor

@diegopf diegopf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch adding all of those deprecated tags!

…posable

# Conflicts:
#	packages/x-components/src/composables/use-x-bus.ts
@diegopf diegopf merged commit 67f0e42 into main May 22, 2024
4 checks passed
@diegopf diegopf deleted the EMP-4087-debounce-composable branch May 22, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants