Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doc comment to the ViewDeferredToRenderer protocol #144

Merged
merged 2 commits into from
Jul 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Sources/TokamakCore/Views/View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ public protocol ParentView {
/// A `View` type that is not rendered, but "flattened" rendering all its children instead.
protocol GroupView: ParentView {}

/** The distinction between "host" (truly primitive) and "composite" (that have meaningful `body`)
views is made in the reconciler in `TokamakCore` based on their `body` type, host views have body
type `Never`. `ViewDeferredToRenderer` allows renderers to override that per-platform and render
host views as composite by providing their own `deferredBody` implementation.
*/
public protocol ViewDeferredToRenderer {
var deferredBody: AnyView { get }
}
Expand Down