Package-level declarations
A multiplatform UDF-based application framework
Parts
| Name | Description |
|---|---|
| Model | Holds data for business logic |
| ViewState | UI state derived from the Model |
| Renderer | Uses the Model to create new State for the UI |
| Action | Mutates the Model and can trigger (any) Effect |
| Effect | Does background work and triggers (any) Action |
| Loop | Handles Action and Effect |
Types
Link copied to clipboard
Action is used to mutate the model and/or trigger effects.
Link copied to clipboard
Interface for Action emitters.
Link copied to clipboard
Type that represents any ActionEmitter.
Link copied to clipboard
Applies arguments to a model.
Link copied to clipboard
Effect is used to perform background tasks.
Link copied to clipboard
interface HasActionEmitter
Can be used to attach child emitters when implemented by a Loop dependency.
Link copied to clipboard
abstract class Loop<out TState : Any, TModel : Any, in TArgs, TDependency, in TAction : Action<TModel, TDependency>>(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) : ActionEmitter<TModel, TDependency>
Base class that handles unidirectional data flow.
Link copied to clipboard
fun interface LoopBuilder<out TState : Any, TModel : Any, in TArgs, TDependency, in TAction : Action<TModel, TDependency>>
Interface for building a given Loop.
Link copied to clipboard
Properties
Functions
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
fun <TModel : Any, TDependency> Action<TModel, TDependency>.next(model: TModel? = null, vararg effects: Effect<TModel, TDependency>): Action.Next<TModel, TDependency>
Shorthand for returning an action result with both changes to the model and triggered effects.
Link copied to clipboard
fun <TModel : Any, TDependency> Action<TModel, TDependency>.trigger(vararg effects: Effect<TModel, TDependency>): Action.Next<TModel, TDependency>
Shorthand for returning an action result with triggered effects only.