@State vs @ObservableObject - which and when?
问题 I'm currently getting familiar with SwiftUI and Combine frameworks. And I'm not really getting the difference between these two approaches. When we have to keep track of some data (say, a list of tasks), we can declare a @State variable, and it's change will automatically send notification and update current view. However, it looks like it can also be done this way: class TaskList: ObservableObject{ //a list that's going to be modified and updated on different occasions @Published var list: