Skip to content

//workflow/com.squareup.workflow1/StatefulWorkflow/render

render

[jvm]
Content
abstract fun render(renderProps: PropsT, renderState: StateT, context: StatefulWorkflow.RenderContext<PropsT, StateT, OutputT, RenderingT>): RenderingT
More info

Called at least once† any time one of the following things happens:

  • This workflow's [renderProps](render.md) changes (via the parent passing a different one in).
  • This workflow's [renderState](render.md) changes.
  • A descendant (immediate or transitive child) workflow:
    • Changes its internal state.
    • Emits an output.

Never call this method directly. To nest the rendering of a child workflow in your own, pass the child and any required props to RenderContext.renderChild.

This method should not have any side effects, and in particular should not do anything that blocks the current thread. It may be called multiple times for the same state. It must do all its work by calling methods on context.

† This method is guaranteed to be called at least once for every state, but may be called multiple times. Allowing this method to be invoked multiple times makes the internals simpler.