Skip to content

Commit c2f9684

Browse files
committed
Fix UIKitCaseStudies' List example (#984)
1 parent 0c3b57d commit c2f9684

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Examples/CaseStudies/UIKitCaseStudies/ListsOfState.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,12 @@ final class CountersTableViewController: UITableViewController {
6161
}
6262

6363
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
64-
let counter = self.viewStore.counters[indexPath.row]
64+
let indexPathRow = indexPath.row
65+
let counter = self.viewStore.counters[indexPathRow]
6566
self.navigationController?.pushViewController(
6667
CounterViewController(
6768
store: self.store.scope(
68-
state: { _ in counter },
69+
state: \.counters[indexPathRow],
6970
action: { .counter(id: counter.id, action: $0) }
7071
)
7172
),

0 commit comments

Comments
 (0)