Which RxJS operator should I use?

The RxJS documentation has a excellent feature called Operator Decision Tree which makes choosing an operator easier.

Starting at the RxJS home page, select API docs and then the Operator Decision Tree. By responding to each question asked about what you are trying to achieve you will be guided to the appropriate operator.

The animated GIF demonstrates how the Operator Decision Tree identified that I should use the map operator to apply a function to each emitted value.

Acknowledgments

Many thanks to Deborah Kurata and her excellent RxJS in Angular: Reactive Development Pluralsight course for making me aware of this feature.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.