Where to use @StateObject and ObservableObject?

239 views Asked by At

I'm learning swiftUI and I'm getting confused in @StateObject and @ObservableObject when to use them and where to use them.

1

There are 1 answers

0
lorem ipsum On BEST ANSWER

See Apple's Managing Model Data in Your App. ObservedObject comes from a parent view and StateObject instantiates in the View that needs it.