Fix: @StateObject → @ObservedObject for DataStore singleton in ContentView
@StateObject is for objects SwiftUI creates and owns. DataStore.shared is an existing singleton, so @ObservedObject is the correct wrapper. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import SwiftUI
|
||||
|
||||
struct ContentView: View {
|
||||
@EnvironmentObject private var notificationHandler: NotificationHandler
|
||||
@StateObject private var store = DataStore.shared
|
||||
@ObservedObject private var store = DataStore.shared
|
||||
@State private var selectedTab = 0
|
||||
|
||||
var body: some View {
|
||||
|
||||
Reference in New Issue
Block a user