SwiftUI: Putting multiple BindableObjects into Environment
The call to environmentObject()
returns a (modified) view, therefore you can chain the calls to put multiple objects into the environment. Example:
let rootView = ContentView()
.environmentObject(firstBindable)
.environmentObject(secondBindable)