Package 

Class SubscribeDslKt

    • Method Summary

      Modifier and Type Method Description
      final static <S extends MVIState, I extends MVIIntent, A extends MVIAction> Job subscribe(Fragment $self, Store<S, I, A> store, SuspendFunction1<A, Unit> consume, SuspendFunction1<S, Unit> render, Lifecycle.State lifecycleState) Subscribe to the store lifecycle-aware.
      final static <S extends MVIState, I extends MVIIntent, A extends MVIAction> Job subscribe(Fragment $self, Store<S, I, A> store, SuspendFunction1<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, StateConsumer<S>, ActionConsumer<A>, Consumer<S, I, A>> Job subscribe(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, Consumer<S, I, A>> Job subscribe(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, Consumer<S, I, A>, ActionConsumer<A>> Job subscribeAndConsume(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, T extends Fragment, StateConsumer<S>, ActionConsumer<A>, Consumer<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, Consumer<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.
      • subscribeAndConsume

         final static <S extends MVIState, I extends MVIIntent, A extends MVIAction, T extends LifecycleOwner, Consumer<S, I, A>, ActionConsumer<A>> Job subscribeAndConsume(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.