Package 

Class SubscribeDslKt

    • Method Summary

      Modifier and Type Method Description
      final static <S extends MVIState, I extends MVIIntent, A extends MVIAction> State<S> subscribe(ImmutableStore<S, I, A> $self, Lifecycle.State lifecycleState, SuspendFunction2<CoroutineScope, A, Unit> consume) A function to subscribe to the store that follows the system lifecycle.
      final static <S extends MVIState, I extends MVIIntent, A extends MVIAction> State<S> subscribe(ImmutableStore<S, I, A> $self, Lifecycle.State lifecycleState) A function to subscribe to the store that follows the system lifecycle.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • subscribe

        @Composable()@Deprecated(message = 
        android-compose module is redundant, because new "compose" module has been made which supports Compose Multiplatform.
        Please just replace android-compose with just "compose" and change the package name to "pro.respawn.flowmvi.compose"
        ) final static <S extends MVIState, I extends MVIIntent, A extends MVIAction> State<S> subscribe(ImmutableStore<S, I, A> $self, Lifecycle.State lifecycleState, SuspendFunction2<CoroutineScope, A, Unit> consume)

        A function to subscribe to the store that follows the system lifecycle.

        • This function will assign the store a new subscriber when invoked, then populate the returned State with new states.

        • Provided consume parameter will be used to consume actions that come from the store.

        • Store's subscribers will not wait until the store is launched when they subscribe to the store. Such subscribers will not receive state updates or actions. Don't forget to launch the store.

        Parameters:
        lifecycleState - the minimum lifecycle state that should be reached in order to subscribe to the store, upon leaving that state, the function will unsubscribe.
        consume - a lambda to consume actions with.
      • subscribe

        @Composable()@Deprecated(message = 
        android-compose module is redundant, because new "compose" module has been made which supports Compose Multiplatform.
        Please just replace android-compose with just "compose" and change the package name to "pro.respawn.flowmvi.compose"
        ) final static <S extends MVIState, I extends MVIIntent, A extends MVIAction> State<S> subscribe(ImmutableStore<S, I, A> $self, Lifecycle.State lifecycleState)

        A function to subscribe to the store that follows the system lifecycle.

        • This function will not collect MVIActions.

        • This function will assign the store a new subscriber when invoked, then populate the returned State with new states.

        • Store's subscribers will not wait until the store is launched when they subscribe to the store. Such subscribers will not receive state updates or actions. Don't forget to launch the store.

        Parameters:
        lifecycleState - the minimum lifecycle state that should be reached in order to subscribe to the store, upon leaving that state, the function will unsubscribe.