Skip to content

//workflow/com.squareup.workflow1/BaseRenderContext/eventHandler

eventHandler

[jvm]
Content
open fun eventHandler(name: () -> String = { “eventHandler” }, update: WorkflowAction.Updater<PropsT, StateT, OutputT>.() -> Unit): () -> Unit
More info

Creates a function which builds a WorkflowAction from the given update function, and immediately passes it to actionSink. Handy for attaching event handlers to renderings.

Parameters

jvm

name

A string describing the update, included in the action’s toString as a debugging aid

update

Function that defines the workflow update.

[jvm]
Content
open fun <EventT> eventHandler(name: () -> String = { “eventHandler” }, update: WorkflowAction.Updater<PropsT, StateT, OutputT>.(EventT) -> Unit): (EventT) -> Unit
open fun <E1, E2> eventHandler(name: () -> String = { “eventHandler” }, update: WorkflowAction.Updater<PropsT, StateT, OutputT>.(E1, E2) -> Unit): (E1, E2) -> Unit
open fun <E1, E2, E3> eventHandler(name: () -> String = { “eventHandler” }, update: WorkflowAction.Updater<PropsT, StateT, OutputT>.(E1, E2, E3) -> Unit): (E1, E2, E3) -> Unit
open fun <E1, E2, E3, E4> eventHandler(name: () -> String = { “eventHandler” }, update: WorkflowAction.Updater<PropsT, StateT, OutputT>.(E1, E2, E3, E4) -> Unit): (E1, E2, E3, E4) -> Unit
open fun <E1, E2, E3, E4, E5> eventHandler(name: () -> String = { “eventHandler” }, update: WorkflowAction.Updater<PropsT, StateT, OutputT>.(E1, E2, E3, E4, E5) -> Unit): (E1, E2, E3, E4, E5) -> Unit
open fun <E1, E2, E3, E4, E5, E6> eventHandler(name: () -> String = { “eventHandler” }, update: WorkflowAction.Updater<PropsT, StateT, OutputT>.(E1, E2, E3, E4, E5, E6) -> Unit): (E1, E2, E3, E4, E5, E6) -> Unit
open fun <E1, E2, E3, E4, E5, E6, E7> eventHandler(name: () -> String = { “eventHandler” }, update: WorkflowAction.Updater<PropsT, StateT, OutputT>.(E1, E2, E3, E4, E5, E6, E7) -> Unit): (E1, E2, E3, E4, E5, E6, E7) -> Unit
open fun <E1, E2, E3, E4, E5, E6, E7, E8> eventHandler(name: () -> String = { “eventHandler” }, update: WorkflowAction.Updater<PropsT, StateT, OutputT>.(E1, E2, E3, E4, E5, E6, E7, E8) -> Unit): (E1, E2, E3, E4, E5, E6, E7, E8) -> Unit
open fun <E1, E2, E3, E4, E5, E6, E7, E8, E9> eventHandler(name: () -> String = { “eventHandler” }, update: WorkflowAction.Updater<PropsT, StateT, OutputT>.(E1, E2, E3, E4, E5, E6, E7, E8, E9) -> Unit): (E1, E2, E3, E4, E5, E6, E7, E8, E9) -> Unit
open fun <E1, E2, E3, E4, E5, E6, E7, E8, E9, E10> eventHandler(name: () -> String = { “eventHandler” }, update: WorkflowAction.Updater<PropsT, StateT, OutputT>.(E1, E2, E3, E4, E5, E6, E7, E8, E9, E10) -> Unit): (E1, E2, E3, E4, E5, E6, E7, E8, E9, E10) -> Unit