import SwiftUI
@main
struct LandmarksApp: App {
// 4. use `@StateObject` to initialize a model object
@StateObject private var modelData = ModelData()
var body: some Scene {
WindowGroup {
/// The `WindowGroup` scene defined in the app body declares `ContentView`
/// as the **root view** of the app.
ContentView()
// 5. put the model object in the environment
.environmentObject(modelData)
}
}
}