-
public final class SubscribeDslKt
-
-
Method Summary
Modifier and Type Method Description final static <S extends MVIState, I extends MVIIntent, A extends MVIAction> Jobsubscribe(Fragment $self, Store<S, I, A> store, Function1<A, Unit> consume, Function1<S, Unit> render, Lifecycle.State lifecycleState)Subscribe to the store lifecycle-aware. final static <S extends MVIState, I extends MVIIntent, A extends MVIAction, T extends Fragment, MVIView<S, I, A>> Jobsubscribe(T $self, 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(Fragment $self, Store<S, I, A> store, Function1<A, Unit> consume, Function1<S, Unit> render, Lifecycle.State lifecycleState)
Subscribe to the store lifecycle-aware. Call this in Fragment.onViewCreated
- 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 Fragment, MVIView<S, I, A>> Job subscribe(T $self, Lifecycle.State lifecycleState)
Subscribe to the store lifecycle-aware. Call this in Fragment.onViewCreated
- Parameters:
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, 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.
-
-
-
-