From 36e02ad1aa7f3bff7a5cd54c8002fd7ed0f45115 Mon Sep 17 00:00:00 2001 From: Tyler Higashi <106772410+tyler-higashi@users.noreply.github.com> Date: Thu, 23 Jun 2022 11:57:34 -1000 Subject: [PATCH] Update Tutorial2.md to clarify an instruction. Made a clarification about what steps a tutorial follower should take to temporarily resolve RootWorkflow's renderChild call on a child Workflow with Nothing as its output type. The override of renderChild needed does not include a lambda as its last parameter. --- samples/tutorial/Tutorial2.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/samples/tutorial/Tutorial2.md b/samples/tutorial/Tutorial2.md index b820db256b..c81cbe3056 100644 --- a/samples/tutorial/Tutorial2.md +++ b/samples/tutorial/Tutorial2.md @@ -258,6 +258,21 @@ object WelcomeWorkflow : StatefulWorkflow() // … } ``` +Remove the lambda at the end of `context.renderChild(WelcomeWorkflow)` +The override for using `renderChild` on a child Workflow with `Nothing` as its output type does not have a lambda parameter + +```kotlin + override fun render( + renderProps: Unit, + renderState: Unit, + context: RenderContext + ): Any { + // Render a child workflow of type WelcomeWorkflow. When renderChild is called, the + // infrastructure will start a child workflow session with state, if one is not already running. + val welcomeScreen = context.renderChild(WelcomeWorkflow) + return welcomeScreen + } + ``` Update the `TutorialActivity` to start at the `RootWorkflow` and we'll see the welcome screen again: