But how do things like EmptyView work? How do they conform to the View protocol without having a body property (that must also be a View)?
[0]: https://developer.apple.com/documentation/swiftui/emptyview/... [1]: https://developer.apple.com/documentation/swiftui/view/32785...
public struct EmptyView: View { @inlinable public init() public typealias Body = Never }
https://forums.swift.org/t/how-do-views-like-emptyview-confo...
> Thread 1: Fatal error: body() should not be called on EmptyView.
So I don't think the implementation is doing anything beyond the fatalError() call from that forum thread. At least not at this point in time.
But how do things like EmptyView work? How do they conform to the View protocol without having a body property (that must also be a View)?