RenderIdempotencyChecker

Intercepts the render pass of the root workflow and runs it twice to ensure that well-written unit tests catch side effects being incorrectly performed directly in the render method.

The first render pass is the real one, the second one is a no-op and child workflow renderings will be played back, in order, to their renderChild calls.

Functions

Link copied to clipboard
open fun <P, S> onInitialState(props: P, snapshot: Snapshot?, workflowScope: CoroutineScope, proceed: (P, Snapshot?, CoroutineScope) -> S, session: WorkflowInterceptor.WorkflowSession): S
Link copied to clipboard
open fun <P, S> onPropsChanged(old: P, new: P, state: S, proceed: (P, P, S) -> S, session: WorkflowInterceptor.WorkflowSession): S
Link copied to clipboard
open override fun <P, S, O, R> onRender(renderProps: P, renderState: S, context: BaseRenderContext<P, S, O>, proceed: (P, S, WorkflowInterceptor.RenderContextInterceptor<P, S, O>?) -> R, session: WorkflowInterceptor.WorkflowSession): R
Link copied to clipboard
Link copied to clipboard
open fun onSessionStarted(workflowScope: CoroutineScope, session: WorkflowInterceptor.WorkflowSession)
Link copied to clipboard
open fun <S> onSnapshotState(state: S, proceed: (S) -> Snapshot?, session: WorkflowInterceptor.WorkflowSession): Snapshot?