Hey RxSwift Observable, are you loading?

Adding loading information to your RxSwift streams

Martin Moizard
Jun 21, 2018 · 2 min read

The Dø approach

A first naive approach would be to use the .do() operator and hack your way into building the desired Observable<Bool> stream.

Introducing `.monitorLoading()`

Recently, I thought about how to avoid any side effects from the Dø approach.

  • .loading() to return a stream emitting a Bool to know if the operation loads or not.
  • .error() to return a stream emitting an Error when the operation fails.

BlaBlaCar Tech

The Tech team of carpooling unicorn BlaBlaCar

Thanks to Adrien Loison and Nicola-Marie O'Donovan.

Martin Moizard

Written by

Software engineer

BlaBlaCar Tech

The Tech team of carpooling unicorn BlaBlaCar