The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Transformation operators: debounce and debounceTime

Transformation operators: debounce and debounceTime

5:21
Debounce and debounceTime operators are similar to delayWhen and delay, with the difference that they may drop some emissions. This lesson teaches you how debounce works and where is it useful, for instance when building a type-ahead UI.
Watch this lesson now
Avatar
egghead.io

Debounce and debounceTime operators are similar to delayWhen and delay, with the difference that they may drop some emissions. This lesson teaches you how debounce works and where is it useful, for instance when building a type-ahead UI.

Avatar
Rafael

I think on first diagram example, using debounceTime(1000), 4| should stop at the same time as the 4| from the source stream, since the stream completes there. When the source stream ends, debounceTime will push its values right away.

/*
--0--1--2--3--4|    timer
--------------4|    debounceTime(1000)
*/
In reply to egghead.io
Avatar
Andre

Correct Rafael, that was my mistake.

In reply to Rafael
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?