vanvoorden
(Rick van Voorden)
4
I actually think this would fail to compile with any "primitive" view component:
let _ = EmptyView().body // ❌
let _ = Text("Hello, world!").body // ❌
What I'm not yet sure about is how to declare my own view component as primitive:
struct NeverView: View {
init() { }
var body: Never
}
let _ = NeverView().body // ✅
Here might be some clues: