SwiftUI

Using SwiftUI’s .task instead of .onAppear

1 minute read

As I’ve been learning SwiftUI, there are times that I’ve wanted to run some async code when a view appeared. The straightforward translation of that intent i...