Add flush_sync and pre_render methods to core

This commit is contained in:
Jonathan Kelley committed 2024-01-28 01:30:33 -08:00
1 parent 3ccf520205
commit 7b0dcb3206
17 files changed
+378 -282

No files matched your search

+3 -3
View File
@@ -82,7 +82,7 @@ impl VNode {
tracing::trace!(
"Memoized props for component {:#?} ({})",
scope_id,
old_scope.context().name
old_scope.state().name
);
return;
}
@@ -94,7 +94,7 @@ impl VNode {
let new = dom.run_scope(scope_id);
dom.diff_scope(to, scope_id, new);
let height = dom.runtime.get_context(scope_id).unwrap().height;
let height = dom.runtime.get_state(scope_id).unwrap().height;
dom.dirty_scopes.remove(&DirtyScope {
height,
id: scope_id,
@@ -130,7 +130,7 @@ impl VNode {
// Load up a ScopeId for this vcomponent. If it's already mounted, then we can just use that
let scope = dom
.new_scope(component.props.duplicate(), component.name)
.context()
.state()
.id;
// Store the scope id for the next render