create

abstract fun create(viewEffectConsumer: Consumer<V>, activeModelEventSource: EventSource<Boolean>): MobiusLoop.Factory<M, E, F>

Creates a MobiusLoop Factory given all the possible dependencies from the MobiusLoopViewModel

Return

The factory used to create the loop

Parameters

viewEffectConsumer

The consumer of View Effects that can be used in your Effect Handler

activeModelEventSource

An Event Source that emits the current active/inactive state of the ViewModel, based on whether the ViewModel's MobiusLoopViewModel.model has any active observers or not. This can be used in conjuncture with ToggledEventSource to be used to control the emissions of any other given Event Source.