Skip to content

Commit

Permalink
Merge pull request #1086 from sssurvey/correcting-sample-tutorial4
Browse files Browse the repository at this point in the history
Fix incorrect variable name in Sample/Tutorial4
  • Loading branch information
rjrjr authored Jul 18, 2023
2 parents 9a5bd11 + 58e2d72 commit 551ee52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/tutorial/Tutorial4.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ object TodoWorkflow : StatefulWorkflow<TodoProps, State, Output, List<Any>>() {
}
```

Because `TodoWorkflow.State` has no properties anymore, it can't be a `data` class, so we need to change it to an `object`. Since the only reason to have a custom type for state is to define the data we want to store, we don't need a custom type anymore so we can just use `Unit`. You might ask why we need a state at all now. We will discuss that in the next section. For now `Unit` will get us moving forward.
Because `TodoListWorkflow.State` has no properties anymore, it can't be a `data` class, so we need to change it to an `object`. Since the only reason to have a custom type for state is to define the data we want to store, we don't need a custom type anymore so we can just use `Unit`. You might ask why we need a state at all now. We will discuss that in the next section. For now `Unit` will get us moving forward.

```kotlin
object TodoListWorkflow : StatefulWorkflow<ListProps, Unit, Output, TodoListScreen>() {
Expand Down

0 comments on commit 551ee52

Please sign in to comment.