File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Sources/ComposableArchitecture Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ public final class ViewStore<State, Action>: ObservableObject {
170170 ///
171171 /// For example, a text field binding can be created like this:
172172 ///
173- /// struct State { var name = "" }
173+ /// typealias State = String
174174 /// enum Action { case nameChanged(String) }
175175 ///
176176 /// TextField(
@@ -199,14 +199,14 @@ public final class ViewStore<State, Action>: ObservableObject {
199199 ///
200200 /// For example, an alert binding can be dealt with like this:
201201 ///
202- /// struct State { var alert: String? }
202+ /// typealias State = String
203203 /// enum Action { case alertDismissed }
204204 ///
205205 /// .alert(
206- /// item: self.store .binding(
206+ /// item: viewStore .binding(
207207 /// send: .alertDismissed
208208 /// )
209- /// ) { alert in Alert(title: Text(alert.message )) }
209+ /// ) { title in Alert(title: Text(title )) }
210210 ///
211211 /// - Parameters:
212212 /// - action: The action to send when the binding is written to.
You can’t perform that action at this time.
0 commit comments