How can I put a delay on the same subsequent action?

134 Views Asked by At

Using redux-toolkit, rxjs, redux-observable

I want to add a 1-second delay between the same action if they are within a short period of time.

A naive example:

if you click a button that displays a pop-up 10 times really quickly, then I want to only show all ten pop-ups but only one pop-up for a second before showing the next pop-up.

let's say the button dispatches an action. is there a way to observe the stream of actions coming in and add a delay?

0

There are 0 best solutions below