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. You would like to wait a little bit for the user to stop typing (so you've got a good query matching what the user actually wants) and then send it to the downstream operator. The debounce operator serves that exact purpose.

For the sake of simplicity, we will not use any UI/UX code of any platform here (we will definitely try ...

Get Reactive Programming in Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.