tell me the best way to increase delay time with rxjs?

You can use the index of the emitted value and calculate the delay based on that.

concatMap((value, index) => {
  return of(value).pipe(delay((index > 2 ? 7 : index) * 1000));

Here is a stackblitz for a complete example with your snippet:

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top