ObservedRealmObject
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
@propertyWrapper
@MainActor
public struct ObservedRealmObject<ObjectType> : DynamicProperty where ObjectType : ObservableObject, ObjectType : RealmSubscribable, ObjectType : ThreadConfined, ObjectType : 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
@dynamicMemberLookup @frozen public struct Wrapper -
Initialize a RealmState struct for a given thread confined type.
Declaration
Swift
@MainActor public init(wrappedValue: ObjectType) where ObjectType : RLMObjectBase, ObjectType : Identifiable -
Initialize a RealmState struct for a given thread confined type.
Declaration
Swift
@MainActor public init<V>(wrappedValue: ObjectType) where ObjectType == List<V>, V : RealmCollectionValue -
Initialize a RealmState struct for a given thread confined type.
Declaration
Swift
@MainActor public init(wrappedValue: ObjectType) where ObjectType : ProjectionObservable
View on GitHub
Install in Dash