Chapter 9. Transformers and Custom Operators
In RxJava, there are ways to implement your own custom operators using the compose()
and lift()
methods, which exist on both Observable
and Flowable
. Most of the time, you will likely want to compose existing RxJava operators to create a new operator. But on occasion, you may find yourself needing an operator that must be built from scratch. The latter is a lot more work, but we will cover how to do both of these tasks.
In this chapter, we will cover the following topics:
- Composing new operators with existing operators using
compose()
and Transformers - The
to()
operator - Implementing operators from scratch with
lift()
- RxJava2-Extras and RxJava2Extensions