SwiftUI’s @StateObject property wrapper is designed to fill a very specific gap in state management: when you need to create a reference type inside one of your views and make sure it stays alive for use in that view and others you share it with.
What is the @StateObject property wrapper? – SwiftUI
Jan 3, 2021
—
1 min read
![What is the @StateObject property wrapper? – SwiftUI](/content/images/size/w300/2021/01/SwiftUI-Cheat-Sheet-3.jpg)