Skip to content

Package oolong - Oolong

oolong / oolong

Package oolong

Types

Name Summary
(common) Dispatch A function to dispatch a Msg to the runtime in the runtime context.typealias Dispatch<Msg> = (Msg) ->Unit
(common) Effect A function to run a side-effect in the effect context. Provides a Dispatch function to dispatch a Msg to the runtime in the runtime context.typealias Effect<Msg> = suspend CoroutineScope.(Dispatch<Msg>) ->Any?

Functions

Name Summary
(common) effect Effect builder function.fun <Msg> effect(block:Effect<Msg>):Effect<Msg>
(common) init Init builder function.fun <Model, Msg> init(block: () ->Pair<Model,Effect<Msg>>): () ->Pair<Model,Effect<Msg>>
(common) render Render builder function.fun <Props, Msg> render(block: (Props,Dispatch<Msg>) ->Any?): (Props,Dispatch<Msg>) ->Any?
(common) runtime Create a runtime.fun <Model, Msg> runtime(init: () ->Pair<Model,Effect<Msg>>, update: (Msg, Model) ->Pair<Model,Effect<Msg>>, view: (Model,Dispatch<Msg>) ->Any?, runtimeContext:CoroutineContext= Dispatchers.Default, renderContext:CoroutineContext= Dispatchers.Main, effectContext:CoroutineContext= Dispatchers.Default): Job
fun <Model, Msg, Props> runtime(init: () ->Pair<Model,Effect<Msg>>, update: (Msg, Model) ->Pair<Model,Effect<Msg>>, view: (Model) -> Props, render: (Props,Dispatch<Msg>) ->Any?, runtimeContext:CoroutineContext= Dispatchers.Default, renderContext:CoroutineContext= Dispatchers.Main, effectContext:CoroutineContext= Dispatchers.Default): Job
(common) update Update builder function.fun <Model, Msg> update(block: (Msg, Model) ->Pair<Model,Effect<Msg>>): (Msg, Model) ->Pair<Model,Effect<Msg>>
(common) view View builder function.fun <Model, Props> view(block: (Model) -> Props): (Model) -> Props