Package 

Interface ConsumerScope

  • All Implemented Interfaces:
    pro.respawn.flowmvi.api.IntentReceiver

    @Stable() 
    public interface ConsumerScope<I extends MVIIntent, A extends MVIAction>
     implements IntentReceiver<I>
                        

    An interface for the scope that provides magic send and consume functions inside your composable

    • Method Summary

      Modifier and Type Method Description
      abstract Unit consume(SuspendFunction2<CoroutineScope, A, Unit> onAction) Collect MVIActions that come from the Store.
      abstract Unit consume() Collect MVIStates emitted by the Store Does not subscribe to MVIActions, unlike the other overload
      • Methods inherited from class pro.respawn.flowmvi.android.compose.ConsumerScope

        emit, intent, send
      • Methods inherited from class java.lang.Object

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

      • consume

         abstract Unit consume(SuspendFunction2<CoroutineScope, A, Unit> onAction)

        Collect MVIActions that come from the Store. Should only be called once per screen. Even if you do not have any Actions in your store you still must call this function to subscribe to the store

      • consume

         abstract Unit consume()

        Collect MVIStates emitted by the Store Does not subscribe to MVIActions, unlike the other overload