You have an Observable stream of user actions in your application. You want to perform a side effect, such as logging, each time an action occurs without modifying the original stream. Which RxJS operator should you use?

  • do (or tap)
  • filter
  • map
  • take
When you want to perform side effects on an observable stream without modifying the data, you should use the do (or tap) operator. This allows you to perform actions like logging or debugging without altering the original stream.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *