-
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. final static <S extends MVIState, I extends MVIIntent, A extends MVIAction, T extends LifecycleOwner, MVIView<S, I, A>> Jobsubscribe(T $self, 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.
-
subscribe
@Deprecated(message = Use the new MVIView interface version of the function, replaceWith = @ReplaceWith(imports = {pro.respawn.flowmvi.android.view.MVIView}, expression = subscribe(lifecycleState))) final static <S extends MVIState, I extends MVIIntent, A extends MVIAction, T extends LifecycleOwner, MVIView<S, I, A>> Job subscribe(T $self, Lifecycle.State lifecycleState)
Subscribe to the store lifecycle-aware.
- Parameters:
lifecycleState- the minimum lifecycle state the LifecycleOwner must be in to receive updates.
-
-
-
-