Immediate debounce in Rx

后端 未结 4 1622
南笙
南笙 2021-02-02 11:59

I am looking an operator to debounce a series of event, let us say user\'s click. The input and output should be like this:

interval :      ->            


        
4条回答
  •  -上瘾入骨i
    2021-02-02 12:43

    The behavior you want is not what debounce operator does in Rx.

    This is called throttle, throttleTime or throttleWithTimeout (however, it falls under debounce category of operators). I don't know what language you use but in RxJS it looks like the following image:

    See http://reactivex.io/documentation/operators/debounce.html.

提交回复
热议问题