Education

Random Lessons from the SwiftUI Digital Lounge

If not, please do file a feedback with some more details on what you would like to achieve. ObservedObject does not have any lifetime implications— when you use that property wrapper, you are responsible for managing the lifetime yourself. The object can live anywhere— either in StateObject or possibly even in another data structure in your app. Although it will work, it will be harder to reuse the same networking calls from other views. In React apps, developers usually call the networking code using libraries like fetch or axios from directly inside the components. This is perfectly fine...

Read more...