-3

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 lots of articles, tutorials, and SO questions about this. Can you clarify what is confusing you? – jnpdx May 10 '21 at 18:36

1 Answers1

2

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

lorem ipsum
  • 21,175
  • 5
  • 24
  • 48