sessionWorkflow

inline fun <PropsT, StateT, OutputT, RenderingT> Workflow.Companion.sessionWorkflow(crossinline initialState: (PropsT, Snapshot?, CoroutineScope) -> 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 }): SessionWorkflow<PropsT, StateT, OutputT, RenderingT>(source)

Returns a SessionWorkflow implemented via the given functions.


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

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


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

Returns a SessionWorkflow implemented via the given functions.

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


inline fun <StateT, OutputT, RenderingT> Workflow.Companion.sessionWorkflow(crossinline initialState: (CoroutineScope) -> StateT, crossinline render: BaseRenderContext<Unit, StateT, OutputT>.(state: StateT) -> RenderingT): SessionWorkflow<Unit, StateT, OutputT, RenderingT>(source)

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

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