While writing SwiftUI views, you might quickly come across an error which says Function declares an opaque return type, but has no return statements in its body from which to infer an underlying type When does such an error happen? A view body in SwiftUI goes like var body: some View {
Text("Hello, World!")
} The…