We currently only inject objects in the SwiftUI environment that conform to ObservableObjectProvider. Unfortunately, this is sometimes unintuitive when developers just want to create a simple component that conforms to ObservableObject and should be injected in the SwiftUI environment, and developers do not need or are not aware of the ObservableObjectProvider protocol.
Solution
We should also check for instances conforming to ObservableObject and inject them into the SwiftUI environment.
Code of Conduct
[X] I agree to follow this project's Code of Conduct and Contributing Guidelines
Problem
We currently only inject objects in the SwiftUI environment that conform to
ObservableObjectProvider
. Unfortunately, this is sometimes unintuitive when developers just want to create a simple component that conforms toObservableObject
and should be injected in the SwiftUI environment, and developers do not need or are not aware of theObservableObjectProvider
protocol.Solution
We should also check for instances conforming to
ObservableObject
and inject them into the SwiftUI environment.Code of Conduct