How do you share the same instance of an object between SwiftUI views without injecting it through all their common ancestors in the view hierarchy?
By using @EnvironmentObject to access it from the environment, the context in which all the views live.
In this chapter, you’ll learn how to share business logic components between views with @EnvironmentObject in a testable way.
Our app is getting closer to being fully functional. To get there, we need to build the UI and business logic to let customers select dishes and make their orders.