ObservedRealmObject
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
@MainActor
@propertyWrapper
public struct ObservedRealmObject<ObjectType>: DynamicProperty
where ObjectType: RealmSubscribable & ThreadConfined & ObservableObject & Equatable
A property wrapper type that subscribes to an observable Realm Object
or List
and
invalidates a view whenever the observable object changes.
-
A wrapper of the underlying observable object that can create bindings to its properties using dynamic member lookup.
See moreDeclaration
Swift
@MainActor @dynamicMemberLookup @frozen public struct Wrapper
-
Initialize a RealmState struct for a given thread confined type.
Declaration
Swift
public init(wrappedValue: ObjectType) where ObjectType : RLMObjectBase, ObjectType : Identifiable
-
Initialize a RealmState struct for a given thread confined type.
Declaration
Swift
public init<V>(wrappedValue: ObjectType) where ObjectType == List<V>, V : RealmCollectionValue
-
Initialize a RealmState struct for a given thread confined type.
Declaration
Swift
public init(wrappedValue: ObjectType) where ObjectType : ProjectionObservable