hocs icon indicating copy to clipboard operation
hocs copied to clipboard

debounce-handler: deal with component unmount

Open user1736 opened this issue 6 years ago • 3 comments

Hi there!

It's more of a question here. Let's say we have a callback with really big delay, in that case the callback might be invoked after the wrapped component had already been unmounted. Should debounce-handler do something with that? e.g. it might prevent debounced function from firing after component unmount, or force to run it right before component unmount, to ensure the last call done while component is still alive.

user1736 avatar Oct 15 '18 14:10 user1736

Sounds good to me, do you mind to make a PR?

deepsweet avatar Oct 27 '18 10:10 deepsweet

@deepsweet sure, I'll try to get to it on upcoming weekend

user1736 avatar Oct 29 '18 10:10 user1736

I just ran into this issue - has it been resolved?

This library made it easy to debounce with recompose - thanks!

jmcpeak avatar Feb 17 '19 14:02 jmcpeak