Skip to content

Commit d24b551

Browse files
authored
Merge pull request #820 from tyler-higashi/patch-1
Update Tutorial2.md to clarify an instruction.
2 parents 39db0a7 + 36e02ad commit d24b551

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)