This should do it: ``` actions.ofType<A...
# rx
a
This should do it:
Copy code
actions.ofType<Action.AddNote>()
                .map { Note(text = it.nodeText) }
                .switchMap { note ->
                    addNoteUseCase.add(note)
                            .subscribeOn(<http://Schedulers.io|Schedulers.io>())
                            .toSingleDefault<Change>(Change.NoteAddSuccess)
                            .onErrorReturn { Change.NoteAddError(it) }
                            .toObservable()
                }