[RxJS] Ignore values during windows using throttleTime

By default, throttleTime(x), after first event emit, then wait for x amount of time, then emit another latest value. All the values between the waiting time will be ignored.

 

Usage:

throttleTime: can be used when we want to reduce the number of certain operation.

 

Configuration:

We can switch between throttleTime() emit the leading value or tailing value.

Leading:

Trailing: 

 

Example: 

 

posted @ 2022-10-09 20:20  Zhentiw  阅读(11)  评论(0编辑  收藏  举报