On rare occasions, you may find yourself having to pass an Observable to another API that converts it into a proprietary type. This can be done simply by passing an Observable as an argument to a factory that does this conversion. However, this does not always feel fluent, and this is where the to() operator comes in.
For example, JavaFX has a Binding<T> type that houses a mutable value of type T and notifies the affected user interface elements to update when it changes. RxJavaFX has JavaFxObserver.toBinding() and JavaFxSubscriber.toBinding() factories, which can turn an Observable<T> or Flowable<T> into a JavaFX Binding<T>.
Here is a simple JavaFX Application:
Pane root = new Pane();
Label label = new Label("0");
label.setScaleX(2.00);
label.setScaleY(2.00);
label.relocate(40, 40);
root.getChildren()...