RxJS, where is the If-Else Operator?
if/else
statements are a staple for handling conditional logic. It’s natural for most developers to reach for the if/else
statement when a decision needs to be made in code. However, in the reactive programming paradigm (e.g. with RxJS) this conditional statement is mysteriously unavailable. How can you code without it?
This is a re-post from February 26, 2018. The code snippets on this have been…