TestLoop
class TestLoop(model: TestModel, renderer: Renderer<TestState, TestModel>, args: TestArgs? = null, onStart: ActionEmitter<TestModel, TestDependency>.() -> Unit = {}, dependency: TestDependency? = null, effectContext: CoroutineContext = DispatcherProvider.IO) : Loop<TestState, TestModel, TestArgs, TestDependency, TestAction>
Loop used in library tests.
Constructors
Link copied to clipboard
constructor(model: TestModel, renderer: Renderer<TestState, TestModel>, args: TestArgs? = null, onStart: ActionEmitter<TestModel, TestDependency>.() -> Unit = {}, dependency: TestDependency? = null, effectContext: CoroutineContext = DispatcherProvider.IO)
Properties
Link copied to clipboard
val <TState : Any, TModel : Any, TArgs : TModel, TDependency, TAction : Action<TModel, TDependency>> Loop<TState, TModel, TArgs, TDependency, TAction>.firstState: TState
The first state of this com.ekezet.hurok.Loop in a blocking fashion. Useful for testing.
Functions
Link copied to clipboard
Apply new arguments to this loop.
Link copied to clipboard
fun <TState : Any, TModel : Any, TArgs, TDependency, TAction : Action<TModel, TDependency>, TLoopBuilder : LoopBuilder<TState, TModel, TArgs, TDependency, TAction>> Loop<TState, TModel, TArgs, TDependency, TAction>.asBuilder(): TLoopBuilder
Link copied to clipboard
Attach this loop as a child to another loop.
Link copied to clipboard
Emit an action to change the state or trigger an effect.