kanawish / android-mvi-sample

Example MVI implementation, based off of Google's architectural samples.
303 stars 56 forks source link

Exception handling in Reducers needs some work #6

Closed kanawish closed 1 year ago

kanawish commented 5 years ago

Received a suggestion to change Observable.just(reducer) usage to

Observable.create{ emitter ->
 val reducer : Reducer<T> = { it.apply(block) }
emitter.onNext(reducer)
emitter.onComplete()
}

The concern being, exceptions are not really being taken in account with current code.

That said, part of my naive thinking has been "crashing reducers? crash the app". Re-evaluate if that actually made sense.