Loop

constructor(model: TModel, renderer: Renderer<TState, TModel>, args: TArgs? = null, argsApplyer: ArgsApplyer<TModel, TArgs>? = null, onStart: ActionEmitter<TModel, TDependency>.() -> Unit = {}, dependency: TDependency? = null, effectContext: CoroutineContext = Dispatchers.IO)

Parameters

model

the initial model

renderer

transform model into state

args

input arguments

argsApplyer

method to apply new args to the model

onStart

block to run before beginning to collect the loop actions

dependency

dependency container

effectContext

dispatcher for launching effects