-
public final class SubscribeDslKt
-
-
Method Summary
Modifier and Type Method Description final static <S extends MVIState, I extends MVIIntent, A extends MVIAction> Jobsubscribe(LifecycleOwner $self, Store<S, I, A> store, SuspendFunction1<A, Unit> consume, SuspendFunction1<S, Unit> render, Lifecycle.State lifecycleState)Subscribe to the provider lifecycle-aware. final static <S extends MVIState, I extends MVIIntent, A extends MVIAction, T extends LifecycleOwner, StateConsumer<S>, ActionConsumer<A>> Jobsubscribe(T $self, Store<S, I, A> provider, Lifecycle.State lifecycleState)Subscribe to the store lifecycle-aware. -
-
Method Detail
-
subscribe
final static <S extends MVIState, I extends MVIIntent, A extends MVIAction> Job subscribe(LifecycleOwner $self, Store<S, I, A> store, SuspendFunction1<A, Unit> consume, SuspendFunction1<S, Unit> render, Lifecycle.State lifecycleState)
Subscribe to the provider lifecycle-aware.
- Parameters:
consume- called on each new action.render- called each time the state changes.lifecycleState- the minimum lifecycle state the LifecycleOwner must be in to receive updates.
-
subscribe
final static <S extends MVIState, I extends MVIIntent, A extends MVIAction, T extends LifecycleOwner, StateConsumer<S>, ActionConsumer<A>> Job subscribe(T $self, Store<S, I, A> provider, Lifecycle.State lifecycleState)
Subscribe to the store lifecycle-aware.
- Parameters:
lifecycleState- the minimum lifecycle state the LifecycleOwner must be in to receive updates.
-
-
-
-