Task Identity

When you write SwiftUI views, one of the big advantages over UIKit is that SwiftUI performs automatic dependency tracking. Whenever your model invalidates or one of your view’s properties change, your view is re-rendered. Consider the following view that loads an image. It runs the image loading code in a task . The task will run the first time the view appears, and it seems to work: struct…