As a final note, the following are various recommendations on how to use ReactiveX and avoid some more traps.
Miscellaneous recommendations
Favor composition of existing operators
ReactiveX contains many operators. Many new operators can be written by combining several of them together. In such cases, it is preferable to use these existing operators and combine them in a lettable function rather than rewriting the whole logic from scratch. A lettable function is a function that takes an observable as input (with additional arguments if needed), and returns an observable. Such a function can be used as a custom operator with the let operator.