Fork me on GitHub
#clojurescript
<
2016-11-23
>
danielstockton09:11:27

Does anyone have a full example of debounce implemented with core.async? I'm having trouble with events disappearing by the time I pull from the channel

danielstockton09:11:29

Think it was a react problem, needed to call .persist() on the event

darwin11:11:01

@danielstockton just a warning, never call close! on a timeout channel, weird things would start happening

danielstockton11:11:39

thanks for the tip, I'm using this implementation for debounce: https://gist.github.com/scttnlsn/9744501

darwin12:11:30

@danielstockton there is also goog.async.Debouncer and goog.functions.debounce in closure library

danielstockton12:11:15

aha, thanks, Debouncer looks good