I think in your case throttleTime
works a little bit better, because you want to make the api request as soon as user clicks the button.
Both throttleTime
and debounceTime
ignore the events which come in the meantime, but throttleTime
emits right away, while
debounceTime
waits for additional delay.
You can visually see that very well at https://rxmarbles.com
What is more, throttleTime vs debounceTime in RxJS article provides a good overview of both operators.