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

chore(fn/debounce): work without #clearTimeout #7

Merged
merged 1 commit into from
Jan 10, 2019
Merged

Conversation

nikku
Copy link
Member

@nikku nikku commented Jan 10, 2019

Adding many different listeners and clearing them can
be a performance concern.

This PR ensures that only one listener is used to implement
debounce. This makes #clearTimeout unnecessary.

It adds additional test coverage that verifies the debounced fn is
called with last (this, ...args), too.

Adding many different listeners and clearing them can
be a performance concern.

This commit ensures that only one listener is used to implement
debounce. This makes #clearTimeout unnecessary.

It adds additional test coverage that verifies the debounced fn is
called with last (this, ...args), too.
@ghost ghost assigned nikku Jan 10, 2019
@ghost ghost added the needs review Review pending label Jan 10, 2019
@nikku nikku requested a review from barmac January 10, 2019 11:31
Copy link
Member

@barmac barmac left a comment

Choose a reason for hiding this comment

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

LGTM

@merge-me merge-me bot merged commit c9ad1d1 into master Jan 10, 2019
@delete-merged-branch delete-merged-branch bot deleted the no-clear-timeout branch January 10, 2019 13:45
@ghost ghost removed the needs review Review pending label Jan 10, 2019
@nikku
Copy link
Member Author

nikku commented Jan 10, 2019

Released as v3.4.0.

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