Blog
1 week ago
The Difference Between EnvironmentObject, StateObject, ObservedObject & Observable
SwiftUI uses a set of property wrappers to handle data changes. @StateObject is a property wrapper that instantiates a class conforming to the `ObservableObject` protocol. @EnvironmentObject is a powerful mechanism for injecting an implicitly injecting an Observable object into a specific branch of your view hierarchy.
Source: HackerNoon →