Skip to content

Update Tutorial2.md to clarify an instruction. #820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions samples/tutorial/Tutorial2.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,21 @@ object WelcomeWorkflow : StatefulWorkflow<Unit, State, Nothing, WelcomeScreen>()
// …
}
```
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:

Expand Down