mapState

open fun <R> mapState(transform: (T) -> R): ObservableState<R>

Transforms the emissions and state of an existing ObservableState instance to a different type. Typically useful for extracting sub-properties of an existing ObservableState.

Return

a new ObservableState emitting the new values of R

Parameters

transform

The transformation block to convert T to a new type R