Closed razvanrujoiu closed 1 year ago
also
I use the ObservableObject instead.
This is not a proper use case of StateObject
or, frankly, dependency injection and not a Stinsen issue.
https://www.avanderlee.com/swiftui/stateobject-observedobject-differences/
I have a root coordinator and multiple child coordinators, and i am trying to pass and @EnvironmentObject around to the child coordinators to pass it further to the child views but i’m getting this warning: “Accessing StateObject’s object without being installed on a View. This will create a new instance each time”. How can i pass a global stateful object around whitout getting this?