Skip to content

Commit ece109f

Browse files
Fix types, .forEach() call (pointfreeco#1957)
1 parent 083ecd5 commit ece109f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Sources/ComposableArchitecture/SwiftUI/ForEachStore.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,19 @@ import SwiftUI
4040
/// state:
4141
///
4242
/// ```swift
43-
/// struct Todos: ReducerProtocol { {
43+
/// struct Todos: ReducerProtocol {
4444
/// struct State: Equatable {
45-
/// var todos: IdentifiedArrayOf<TodoState> = []
45+
/// var todos: IdentifiedArrayOf<Todo.State> = []
4646
/// }
47+
/// ...
48+
/// }
4749
/// ```
4850
///
4951
/// Define a case to handle actions sent to the child domain:
5052
///
5153
/// ```swift
5254
/// enum Action {
53-
/// case todo(id: TodoState.ID, action: TodoAction)
55+
/// case todo(id: Todo.State.ID, action: Todo.Action)
5456
/// }
5557
/// ```
5658
///
@@ -61,7 +63,7 @@ import SwiftUI
6163
/// Reduce { state, action in
6264
/// ...
6365
/// }
64-
/// .forEach(state: \.todos, action: /Action.todo(id:action:)) {
66+
/// .forEach(\.todos, action: /Action.todo(id:action:)) {
6567
/// Todo()
6668
/// }
6769
/// }

0 commit comments

Comments
 (0)