// // RootView.swift // Root // import SwiftUI import Facts import ComposableArchitecture public struct RootView: View { @Bindable var store: StoreOf public init(store: StoreOf) { self.store = store } public var body: some View { NavigationStack { FactsView(store: store.scope(state: \.facts, action: \.facts)) }.onAppear { store.send(.viewAppeared) } } } #Preview { RootView(store: .init(initialState: RootFeature.State()) { RootFeature() }) }