The filtering/suppressing operators
Think of a situation when you want to receive some emissions from the producer but want to discard the rest. There may be some logic to determine the qualifying emissions, or you may even wish to discard in bulk. The filtering
/suppressing
operators are there to help you in these situations.
Here is a brief list of filtering
/suppressing
operators:
debounce
distinct
anddistinctUntilChanged
elementAt
Filter
first
andlast
ignoreElements
skip
,skipLast
,skipUntil
, andskipWhile
take
,takeLast
,takeUntil
, andtakeWhile
Let's now take a closer look at all of them.
The debounce operator
Think of a situation where you're receiving emissions rapidly, and are willing to take the last one after taking some time to be sure about it.
When developing an application UI/UX, we often come to such a situation. For example, you have created a text input and are willing to perform some operation when the user types something, but you don't want to perform this operation on each keystroke...