I just watched the Jake Wharton State of Governing State conference with RxJava .
He suggests converting events from view to action in this way:
Observable<Event> events = RxView.clicks(view).map(__ -> new Event()); ObservableTransformer<Event, Action> action = events -> events.flatMap(); events.compose(action).subscribe();
I would like to know the difference with this implementation:
Observable<Event> events = RxView.clicks(view).map(__ -> new Event()); Observable<Action> action = events.flatMap(); action.subscribe();
What is the difference between using compose() with an ObservableTransformer and a simple flatMap() with two Observables?
source share