legacy-workflow-rx2 / com.squareup.workflow.legacy.rx2 / com.squareup.workflow.legacy.Workflow / switchMapState

switchMapState

fun <S1 : Any, S2 : Any, E : Any, O : Any> Workflow<S1, E, O>.switchMapState(transform: (S1) -> Observable<out S2>): Workflow<S2, E, O>
Deprecated: Use com.squareup.workflow.Workflow

Like mapState, transforms the receiving workflow with Workflow.state of type S1 to one with states of S2. Unlike that method, each S1 update is transformed into a stream of S2 updates -- useful when an S1 state might wrap an underlying workflow whose own screens need to be shown.