stateful

inline fun <PropsT, StateT, OutputT, RenderingT> Workflow.Companion.stateful(crossinline initialState: (PropsT, Snapshot?) -> StateT, crossinline render: BaseRenderContext<PropsT, StateT, OutputT>.(props: PropsT, state: StateT) -> RenderingT, crossinline snapshot: (StateT) -> Snapshot?, crossinline onPropsChanged: (old: PropsT, new: PropsT, state: StateT) -> StateT = { _, _, state -> state }): StatefulWorkflow<PropsT, StateT, OutputT, RenderingT>(source)

Returns a stateful Workflow implemented via the given functions.


inline fun <StateT, OutputT, RenderingT> Workflow.Companion.stateful(crossinline initialState: (Snapshot?) -> StateT, crossinline render: BaseRenderContext<Unit, StateT, OutputT>.(state: StateT) -> RenderingT, crossinline snapshot: (StateT) -> Snapshot?): StatefulWorkflow<Unit, StateT, OutputT, RenderingT>(source)

Returns a stateful Workflow, with no props, implemented via the given functions.


inline fun <PropsT, StateT, OutputT, RenderingT> Workflow.Companion.stateful(crossinline initialState: (PropsT) -> StateT, crossinline render: BaseRenderContext<PropsT, StateT, OutputT>.(props: PropsT, state: StateT) -> RenderingT, crossinline onPropsChanged: (old: PropsT, new: PropsT, state: StateT) -> StateT = { _, _, state -> state }): StatefulWorkflow<PropsT, StateT, OutputT, RenderingT>(source)

Returns a stateful Workflow implemented via the given functions.

This overload does not support snapshotting, but there are other overloads that do.


Returns a stateful Workflow, with no props, implemented via the given function.

This overload does not support snapshots, but there are others that do.