🔸published value
SwiftUI ⟩ view ⟩ state ⟩ observable object ⟩ published value
In an observable object, a property declared by adding @Published property wrapper that notifies all observers when its value is about to change. When the value changes, SwiftUI updates all views that use its data. Also called a published property.
ObservableObject:declare an observable object type.
@Published:declare a published value in an observable object type.
@StateObject:initialize an observable object.
Last updated