create

fun <M, E, F, V> create(loopFactoryProvider: MobiusLoopFactoryProvider<M, E, F, V>, modelToStartFrom: M, init: Init<M, F>? = null, maxEffectsToQueue: Int = 100): MobiusLoopViewModel<M, E, F, V>

Creates a new MobiusLoopViewModel instance.

Parameters

loopFactoryProvider

The provider for the factory, that gets passed all dependencies

modelToStartFrom

the initial model for the loop

init

the Init function of the loop

maxEffectsToQueue

the maximum number of effects to queue while paused, default 100

M

the model type

E

the event type

F

the effect type

V

the view effect type