Skip to content

Commit d54c1f7

Browse files
committed
Update type errors in tutorial readme files
1 parent 357fbfd commit d54c1f7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

samples/tutorial/Tutorial2.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ object RootNavigationWorkflow : StatefulWorkflow<Unit, Unit, Nothing, Screen>()
208208
return welcomeScreen
209209
}
210210

211-
override fun snapshotState(state: State): Snapshot? = null
211+
override fun snapshotState(state: Unit): Snapshot? = null
212212
}
213213
```
214214

@@ -349,9 +349,9 @@ Finally, map the output event from `WelcomeWorkflow` in `RootNavigationWorkflow`
349349
```kotlin
350350
override fun render(
351351
renderProps: Unit,
352-
renderState: Unit,
352+
renderState: State,
353353
context: RenderContext
354-
): Screen {
354+
): WelcomeScreen {
355355
// Render a child workflow of type WelcomeWorkflow. When renderChild is called, the
356356
// infrastructure will start a child workflow session if one is not already running.
357357
val welcomeScreen = context.renderChild(WelcomeWorkflow) { output ->

samples/tutorial/Tutorial4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ object TodoListWorkflow : StatefulWorkflow<ListProps, State, Output, TodoListScr
109109
//
110110
}
111111

112-
override fun snapshotState(state: Unit): Snapshot? = null
112+
override fun snapshotState(state: State): Snapshot? = null
113113

114114
//
115115
}

0 commit comments

Comments
 (0)