-
Book Overview & Buying
-
Table Of Contents
Reactive Programming in Kotlin
By :
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:
debouncedistinct and distinctUntilChangedelementAtFilterfirst and lastignoreElementsskip, skipLast, skipUntil, and skipWhiletake, takeLast, takeUntil, and takeWhileLet's now take a closer look at all of them.
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...