I am trying to implement an Apple Watch app in a similar way as this question: Issues implementing navigation from a main controller to page based controllers in WatchOS using SwiftUI
I am trying to pass data between different HostingControllers. My data is stored in an EnvironmentObject with published properties. If I only use one HostingController, it's fine to share data between the different views. But when using a different HostingController, hosting different views (without segues), I can't find the syntax for using my Environment object from HC1 to HC2, the HC3, etc.
I present the HostingController using this piece of code in my SwiftUI views.
NavigationLink(destinationName: "HC2"){
Text("Go to HC2")