public protocol View {
/// The type of view representing the body of this view.
///
/// When you create a custom view, Swift infers this type from your
/// implementation of the required `body` property.
associatedtype Body : View
/// Declares the content and behavior of this view.
var body: Self.Body { get }
}
SwiftUI использует связанный тип со своим телом, в чем смысл, имеет ли он какое-либо преимущество?
почему он не делает возвращаемый тип body
как представление, похожее на флаттер? ?
public protocol View {
var body: View { get }
}