{"id":638,"date":"2023-03-10T05:00:00","date_gmt":"2023-03-10T13:00:00","guid":{"rendered":"https:\/\/www.angulartraining.com\/daily-newsletter\/?p=638"},"modified":"2023-03-08T11:49:19","modified_gmt":"2023-03-08T19:49:19","slug":"how-to-decide-which-rxjs-operator-to-use","status":"publish","type":"post","link":"https:\/\/www.angulartraining.com\/daily-newsletter\/how-to-decide-which-rxjs-operator-to-use\/","title":{"rendered":"How to decide which RxJs operator to use?"},"content":{"rendered":"\n<p>There are more than <a href=\"https:\/\/rxjs.dev\/api?type=function#:~:text=zipWith-,operators,-audit\" target=\"_blank\" rel=\"noopener\" title=\"\">120 operators in RxJs<\/a>, and with so many options, it can be challenging to decide which one we should use. We covered a <a href=\"https:\/\/www.angulartraining.com\/daily-newsletter\/category\/rxjs\/operators\/\" target=\"_blank\" rel=\"noopener nofollow\" title=\"\">few of them<\/a> in this newsletter so far and mentioned websites such as <a href=\"https:\/\/www.angulartraining.com\/daily-newsletter\/how-to-learn-more-about-rxjs-operators\/\" target=\"_blank\" rel=\"noopener\" title=\"\">Rxmarbles to learn more about these operators<\/a>.<\/p>\n\n\n\n<p>Luckily, <a href=\"https:\/\/rxjs.dev\/\" target=\"_blank\" rel=\"noopener\" title=\"\">Rxjs.dev<\/a> has an interesting feature called the <a href=\"https:\/\/rxjs.dev\/operator-decision-tree\" target=\"_blank\" rel=\"noopener\" title=\"\">operator decision tree<\/a>. This tool asks a few questions about what we&#8217;re trying to do and ends up suggesting one operator that answers that need.<\/p>\n\n\n\n<p>It uses a wizard-style approach:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"505\" height=\"311\" src=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/03\/image-14.png\" alt=\"\" class=\"wp-image-640\" srcset=\"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/03\/image-14.png 505w, https:\/\/www.angulartraining.com\/daily-newsletter\/wp-content\/uploads\/2023\/03\/image-14-300x185.png 300w\" sizes=\"auto, (max-width: 505px) 100vw, 505px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n\n\n\n<p>The tool is excellent and does save a lot of time researching operators in the documentation. I found some scenarios where it suggests deprecated options. Still, each deprecated feature has a link to its replacement, so it&#8217;s easy to find the actual operator to use from there.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are more than 120 operators in RxJs, and with so many options, it can be challenging to decide which one we should use. We covered a few of them in this newsletter so far and mentioned websites such as Rxmarbles to learn more about these operators. Luckily, Rxjs.dev has an interesting feature called the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,10,17],"tags":[],"class_list":["post-638","post","type-post","status-publish","format-standard","hentry","category-operators","category-rxjs","category-tools"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts\/638","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/comments?post=638"}],"version-history":[{"count":3,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts\/638\/revisions"}],"predecessor-version":[{"id":642,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/posts\/638\/revisions\/642"}],"wp:attachment":[{"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/media?parent=638"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/categories?post=638"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.angulartraining.com\/daily-newsletter\/wp-json\/wp\/v2\/tags?post=638"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}