ComposeMobiusLoopStateHolder

data class ComposeMobiusLoopStateHolder<M, E>(val model: State<M>, val eventConsumer: (E) -> Unit)

Holds the State<M> and Consumer<E> created by rememberMobiusLoop.

For easy access, the model state and eventConsumer can be destructured:

val (modelState, eventConsumer) = rememberMobiusLoop(Model()) {
Mobius.loop(Update(), effectHandler)
}

Constructors

Link copied to clipboard
constructor(model: State<M>, eventConsumer: (E) -> Unit)

Properties

Link copied to clipboard
val eventConsumer: (E) -> Unit
Link copied to clipboard
val model: State<M>