๐ธ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
Was this helpful?