Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.

debounce-handler: invoke actual function from component props #22

Merged
merged 1 commit into from
Jul 31, 2018

Conversation

user1736
Copy link
Contributor

Hi there!

Not sure if it's designed behaviour or just a bug, but current implementation of debounceHandler doesn't pick updates from props. As a result, if during wrapped component lifetime parent component decide to pass a new version of the handler function, wrapped component won't receive it and will continue using initial version of the handler.

Here's the short demo of the problem.

@user1736 user1736 force-pushed the feat/dynamic-prop-debouncing branch from c2fa59d to f0e193a Compare July 20, 2018 17:02
@codecov-io
Copy link

codecov-io commented Jul 20, 2018

Codecov Report

Merging #22 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #22   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          17     17           
  Lines         238    239    +1     
=====================================
+ Hits          238    239    +1
Impacted Files Coverage Δ
packages/debounce-handler/src/index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36ebfbe...9d31b54. Read the comment docs.

@deepsweet
Copy link
Owner

Thanks, I'll take a look.

@deepsweet
Copy link
Owner

Do you mind adding an additional test for that?

@user1736
Copy link
Contributor Author

Sure, I will do it this week

@user1736 user1736 force-pushed the feat/dynamic-prop-debouncing branch from 213922a to a33ebb7 Compare July 27, 2018 16:32
@user1736 user1736 force-pushed the feat/dynamic-prop-debouncing branch from a33ebb7 to 9d31b54 Compare July 27, 2018 16:33
@user1736
Copy link
Contributor Author

@deepsweet I added the tests, could you please have a look at it?

@deepsweet deepsweet merged commit 2714c84 into deepsweet:master Jul 31, 2018
@deepsweet deepsweet changed the title with-debounce-handler: invoke actual function from component props debounce-handler: invoke actual function from component props Jul 31, 2018
@deepsweet
Copy link
Owner

Thanks! Just landed with debounce-handler@0.4.1 as a patch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants