File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ targets: [
3232
3333## <br ><br > Usage
3434
35- ### StateViewModel — Designed for SwiftUI
35+ ### StateViewModel — A container for your state properties
3636
3737``` Swift
3838struct CounterState {
@@ -71,7 +71,6 @@ struct CounterView: View {
7171### EventViewModel — One-Off Effects, SwiftUI-Friendly
7272
7373``` Swift
74- protocol ViewModelEvent {}
7574struct LoginSucceeded : ViewModelEvent {}
7675struct LoginFailed : ViewModelEvent { let message: String }
7776
@@ -172,7 +171,7 @@ final class ChildViewModel: EventViewModel, ObservableObject {
172171}
173172```
174173
175- ##### < br > ** Call order **
174+ ### ** Call order: **
176175
1771761 . `ParentView` renders and subscribes to `child.eventPublisher `.
1781772 . User taps " Send to child" button.
@@ -277,13 +276,6 @@ struct ChildBView: View {
2772767 . `ChildBViewModel` emits an `ExampleEvent` via its own `eventSubject`.
2782778 . `ChildBView` listens to `viewModel.eventPublisher ` via `.onReceive `, receives the event, and updates its UI (`lastEvent`).
279278
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
287279
288280## < br> License
289281
You can’t perform that action at this time.
0 commit comments