Package 

Class SubscribeDslKt

    • Method Summary

      Modifier and Type Method Description
      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.
      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.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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

         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.