June 2017
Beginner to intermediate
274 pages
6h 49m
English
First on that list is Observable.create shown in the following code example. This is the recommended way of creating a completely customized observable:
rx.Observable.create((lambda obs: obs.on_next('Hi!')))
The create method has callable as its parameter and calls that callable each time an observer subscribes to the observable.
In the preceding code example, we created an observable that says Hi! when an observer subscribes and then never produces another value; not the most useful of sequences, but it serves to illustrate the idea.
We can take the basic framework and construct an observable with any behavior we like from it, without subclassing the observable class and without re-implementing, probably incorrectly, ...
Read now
Unlock full access