How to Implement MVVM with Combine in SwiftUI

How to Implement MVVM with Combine in SwiftUI

In this article we are going to learn how to implement the powerful MVVM design pattern in SwiftUI applications that are leveraging the Combine framework. The combination of these 3 concepts will be the standard of iOS app architecture for the years to come, so it’s really important to set up a solid groundwork when it comes to designing Swift apps going forward.

[…]

From the iOS 13, URLSession supports a built-in publisher, which publishes data when the task completes or terminates if the task fails with an error. That is DataTaskPublisher.

[…]