New article: Understanding SwiftUI view lifecycles https://oleb.net/2022/swiftui-view-lifecycle/
Understanding SwiftUI view lifecycles – Ole Begemann

I wrote an app for observing how various SwiftUI constructs and container views affect view lifecycles, including the lifetime of state.

@ole I could probably test this myself, but does .task have the same semantics as .onAppear, or is it called only once at the beginning of the view's lifetime?
@shadowfacts Good question. .task (without passing an id) has the same semantics as .onAppear. The only difference is that .task may be called a few frames later because it executes its action async.