Skip to content
Open
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
4 changes: 3 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ There’s some glue code missing from this example that's covered in the [Code G

```kotlin
@Parcelize
data object CounterScreen : Screen {
data object CounterScreen : Screen

data object CounterCircuit {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really need the namespace object either. Maybe we remove CounterCircuit and flatten this more to CounterScreen, CounterState, and CounterEvent?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually make state an nested class of the presenter, so it clearly declares relation between presenter and state.

data class CounterState(
val count: Int,
val eventSink: (CounterEvent) -> Unit,
Expand Down