DEV Community

Anuja Piayadigama
Anuja Piayadigama

Posted on

How to pass data from a parent model class to a subview in SwiftUI

I am having my main view in ContentView class and I do the network call in ContentViewModel class and update a class call User with the response.

My ContentView has several subviews such as HeaderView. When I update the User class properties from the API response, I want to update…

Top comments (0)