File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ targets: [
32
32
33
33
## <br ><br > Usage
34
34
35
- ### StateViewModel — Designed for SwiftUI
35
+ ### StateViewModel — A container for your state properties
36
36
37
37
``` Swift
38
38
struct CounterState {
@@ -71,7 +71,6 @@ struct CounterView: View {
71
71
### EventViewModel — One-Off Effects, SwiftUI-Friendly
72
72
73
73
``` Swift
74
- protocol ViewModelEvent {}
75
74
struct LoginSucceeded : ViewModelEvent {}
76
75
struct LoginFailed : ViewModelEvent { let message: String }
77
76
@@ -172,7 +171,7 @@ final class ChildViewModel: EventViewModel, ObservableObject {
172
171
}
173
172
```
174
173
175
- ##### < br > ** Call order **
174
+ ### ** Call order: **
176
175
177
176
1 . `ParentView` renders and subscribes to `child.eventPublisher `.
178
177
2 . User taps " Send to child" button.
@@ -277,13 +276,6 @@ struct ChildBView: View {
277
276
7 . `ChildBViewModel` emits an `ExampleEvent` via its own `eventSubject`.
278
277
8 . `ChildBView` listens to `viewModel.eventPublisher ` via `.onReceive `, receives the event, and updates its UI (`lastEvent`).
279
278
280
- ## < br> Contributing
281
-
282
- We welcome contributions, feature suggestions, and bug reports.
283
-
284
- * Target Swift 5.9 +
285
- * Prefer actor- based, concurrency- safe implementations
286
- * Include tests for new features
287
279
288
280
## < br> License
289
281
You can’t perform that action at this time.
0 commit comments