LambdaIntent

value class LambdaIntent<S : MVIState, A : MVIAction>(block: suspend PipelineContext<S, LambdaIntent<S, A>, A>.() -> Unit) : MVIIntent

An intent that is a holder for a block that acts as this intent's logic. LambdaIntents enable MVVM+ -style declaration of your pro.respawn.flowmvi.api.Store.

  • Use reduceLambdas to handle lambda intents in your store.

  • Use send to send lambda intents and define a block for them to be processed.

When using lambda intents, some plugins will become useless (as they'll no longer know what's inside the lambda), e.g. logging of lambda intents

Constructors

Link copied to clipboard
constructor(block: suspend PipelineContext<S, LambdaIntent<S, A>, A>.() -> Unit)

Functions

Link copied to clipboard
open override fun toString(): String