subscribe

inline fun <S : MVIState, I : MVIIntent, A : MVIAction> Lifecycle.subscribe(store: ImmutableStore<S, I, A>, scope: CoroutineScope, mode: SubscriptionMode = SubscriptionMode.Started, crossinline block: suspend Provider<S, I, A>.() -> Unit): Job
inline fun <S : MVIState, I : MVIIntent, A : MVIAction> LifecycleOwner.subscribe(store: ImmutableStore<S, I, A>, scope: CoroutineScope = coroutineScope(), mode: SubscriptionMode = SubscriptionMode.Started, crossinline block: suspend Provider<S, I, A>.() -> Unit): Job

Subscribe to the store in the scope of this LifecycleOwner's lifecycle.


@JvmName(name = "subscribeContainer")
inline fun <T : LifecycleOwner, ImmutableContainer<S, I, A>, S : MVIState, I : MVIIntent, A : MVIAction> T.subscribe(scope: CoroutineScope = coroutineScope(), mode: SubscriptionMode = SubscriptionMode.Started, crossinline block: suspend Provider<S, I, A>.() -> Unit): Job
@JvmName(name = "subscribeStore")
inline fun <T : LifecycleOwner, ImmutableStore<S, I, A>, S : MVIState, I : MVIIntent, A : MVIAction> T.subscribe(scope: CoroutineScope = coroutineScope(), mode: SubscriptionMode = SubscriptionMode.Started, crossinline block: suspend Provider<S, I, A>.() -> Unit): Job

Subscribe to the Container.store of this container in the scope of this LifecycleOwner's lifecycle.

The subscription will follow the mode specified.