How to fetch data from API in SwiftUI views?

Thanks! So in your example, you have a separate class for the view model that I ask for videos, rather than trying to get videos into the SwiftUI view itself.

In your example, the view model has a fetchVideos method that does the actual network call and populates the videos property. How is that method invoked from my SwiftUI view?