Skip to content

Commit ffff388

Browse files
committed
Update code errors in tutorial 2 readme file
1 parent d54c1f7 commit ffff388

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

samples/tutorial/Tutorial2.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,10 @@ At the same time, add a `reportNavigation()` call when creating the `renderings`
254254
workflow = RootNavigationWorkflow,
255255
scope = viewModelScope,
256256
savedStateHandle = savedState
257-
)
258-
}.reportNavigation {
259-
Log.i("navigate", it.toString())
260-
}
257+
).reportNavigation {
258+
Log.i("navigate", it.toString())
259+
}
260+
}
261261
```
262262

263263
Now when you run the app we'll see the welcome screen again.
@@ -486,8 +486,12 @@ object TodoListWorkflow : StatefulWorkflow<ListProps, State, Nothing, TodoListSc
486486
renderState: State,
487487
context: RenderContext
488488
): TodoListScreen {
489-
username = renderProps.username,
490-
todoTitles = titles,
489+
val titles = renderState.todos.map { it.title }
490+
491+
return TodoListScreen(
492+
username = renderProps.username,
493+
todoTitles = titles,
494+
)
491495
}
492496
```
493497

0 commit comments

Comments
 (0)