Blog51.5K views3,498 votes1 reply1 comment758 following
Mastering SwiftUI @StateObject: Persisting View Models Across Reloads
Learn how SwiftUI’s @StateObject keeps a single view model instance across view reloads, how to inject it into child views, and when not to use it.