How ObservableObject work in SwiftUI
Issue #815 When ever a property marked with @Published change, ObservableObject will emit objectWillChange.send hence telling the View that observes it to reinvalidate. In WWDC 2021 session Discover concurrency in SwiftUI they mention how objectWillChange is used to grab before-change data to diff the changes. In the below example, we have 2 ObservableObject Store with just count value being used in the View, while flag is not used Store2 with count not being used But since the View observes these 2 objects, whenever any @Publish property changes, SwiftUI thinks that the data changes, then invalidates the body again to see if it needs to redraw....