-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Pass sibling to Renderer.mount
, fix update order
#301
Conversation
@@ -31,9 +31,6 @@ public protocol Renderer: AnyObject { | |||
*/ | |||
associatedtype TargetType: Target | |||
|
|||
/// Reconciler instance used by this renderer. | |||
var reconciler: StackReconciler<Self>? { get } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't referenced anywhere, so no need to have it as a requirement. It also allowed making this property completely private
in Renderer
implementations.
@@ -71,7 +71,7 @@ func appendRootStyle(_ rootNode: JSObject) { | |||
} | |||
|
|||
final class DOMRenderer: Renderer { | |||
private(set) var reconciler: StackReconciler<DOMRenderer>? | |||
private var reconciler: StackReconciler<DOMRenderer>? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still keeping the property implementation itself around, as we need a non-zero retain count on it. The reconciler is really what drives the rendering process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! The original issue was a great catch 😅
Resolves, but adds no test cases to the test suite for #294. See the issue for the detailed description of the problem.
I will add end-to-end tests for this in future PRs.
I've tested these cases manually so far:
Note the
Group
view with multiple children in this one, it uncovered required checks forGroupView
conformance.Also tested these more simple cases:
and