HTMLKit
HTMLKit copied to clipboard
API consideration
Why we not using SwiftUI-like "some Content" to constraint body rather using "AnyContent"?
Is there some limitation keeping us away from using it?
Something like
public protocol Content {
associatedtype Body : Content
@ContentBuilder var body: Self.Body { get }
}
public protocol Page: GlobalElement {
@ContentBuilder var body: some Content { get }
}
Thanks for bringing your thoughts into this. If I recall it right, I tried already this approach, but I didn't go well, cause of the pre-rendering. Give me some time to investigate on this and let me come back to you before I can give you a finally answer, okay?
What did you find out, @mattesmohr? I'm happy to help with the conversion if this looks like a workable idea.