State of an instance is not updating -- SwiftUI
Solution 1:
The @State
property wrapper is NOT meant to be used inside a data model, like your struct Task. The @State
property wrapper is a property wrapper meant to be used on SwiftUI Views. If you remove @State
, you should be in good shape.