iOS Swift - State Management in SwiftUI
Given the code below, what will be printed when
model.count = 5 is executed?
class Model: ObservableObject {
@Published var count: Int = 0
}
let model = Model()
model.$count.sink { print("Count changed to \($0)") }