Skip to content

//workflow/com.squareup.workflow1/stateful

stateful

[jvm]
Content
inline fun <PropsT, StateT, OutputT, RenderingT> Workflow.Companion.stateful(crossinline initialState: (PropsT, Snapshot?) -> StateT, crossinline render: BaseRenderContext<PropsT, StateT, OutputT>.(PropsT, StateT) -> RenderingT, crossinline snapshot: (StateT) -> Snapshot?, crossinline onPropsChanged: (PropsT, PropsT, StateT) -> StateT = { _, _, state -> state }): StatefulWorkflow<PropsT, StateT, OutputT, RenderingT>
More info

Returns a stateful Workflow implemented via the given functions.

[jvm]
Content
inline fun <StateT, OutputT, RenderingT> Workflow.Companion.stateful(crossinline initialState: (Snapshot?) -> StateT, crossinline render: BaseRenderContext<Unit, StateT, OutputT>.(StateT) -> RenderingT, crossinline snapshot: (StateT) -> Snapshot?): StatefulWorkflow<Unit, StateT, OutputT, RenderingT>
More info

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

[jvm]
Content
inline fun <PropsT, StateT, OutputT, RenderingT> Workflow.Companion.stateful(crossinline initialState: (PropsT) -> StateT, crossinline render: BaseRenderContext<PropsT, StateT, OutputT>.(PropsT, StateT) -> RenderingT, crossinline onPropsChanged: (PropsT, PropsT, StateT) -> StateT = { _, _, state -> state }): StatefulWorkflow<PropsT, StateT, OutputT, RenderingT>
More info

Returns a stateful Workflow implemented via the given functions.

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

[jvm]
Content
inline fun <StateT, OutputT, RenderingT> Workflow.Companion.stateful(initialState: StateT, crossinline render: BaseRenderContext<Unit, StateT, OutputT>.(StateT) -> RenderingT): StatefulWorkflow<Unit, StateT, OutputT, RenderingT>
More info

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

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