Skip to content

Commit 36e02ad

Browse files
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.
1 parent 0d81317 commit 36e02ad

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

samples/tutorial/Tutorial2.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,21 @@ object WelcomeWorkflow : StatefulWorkflow<Unit, State, Nothing, WelcomeScreen>()
258258
//
259259
}
260260
```
261+
Remove the lambda at the end of `context.renderChild(WelcomeWorkflow)`
262+
The override for using `renderChild` on a child Workflow with `Nothing` as its output type does not have a lambda parameter
263+
264+
```kotlin
265+
override fun render(
266+
renderProps: Unit,
267+
renderState: Unit,
268+
context: RenderContext
269+
): Any {
270+
// Render a child workflow of type WelcomeWorkflow. When renderChild is called, the
271+
// infrastructure will start a child workflow session with state, if one is not already running.
272+
val welcomeScreen = context.renderChild(WelcomeWorkflow)
273+
return welcomeScreen
274+
}
275+
```
261276

262277
Update the `TutorialActivity` to start at the `RootWorkflow` and we'll see the welcome screen again:
263278

0 commit comments

Comments
 (0)