Just found out that it works correctly on iOS 14 if you have parentheses after onAppear/onDisappear:
.onAppear() {
print("...code here")
}
.onDisappear() {
print("...code here")
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: