← Back to index

SpotsApp

Spots Watch App
CodeWhat It DoesHow It Does It
▶ IMPORTS
import SwiftUIFramework importsImports SwiftUI.
@main struct SpotsApp: App { var body: some Scene { WindowGroup { WatchRootView() } } }Code blockSee source code for full implementation.
/// Root view that owns the store lifetime via @StateObject, /// then injects it as an environment object for all child views. struct WatchRootView: View { @StateObject private var store = WatchEntryStore() var body: some View { NavigationStack { WatchHomeView() } .environmentObject(store) } }Documentation commentDescribes the following declaration.