mvrx-rxjava2 / com.airbnb.mvrx / BaseMvRxViewModel / subscribe

subscribe

protected fun subscribe(subscriber: (S) -> Unit): Disposable

For ViewModels that want to subscribe to itself.

fun subscribe(owner: LifecycleOwner, deliveryMode: DeliveryMode = RedeliverOnStart, subscriber: (S) -> Unit): Disposable

Subscribe to state when this LifecycleOwner is started.

protected fun <S : MavericksState> subscribe(viewModel: BaseMvRxViewModel<S>, subscriber: (S) -> Unit): Unit

For ViewModels that want to subscribe to another ViewModel.