restore core tests

This commit is contained in:
Evan Almloff committed 2024-01-16 15:51:02 -06:00
1 parent b58eb04278
commit ad01a45f3b
9 files changed
+19 -11

No files matched your search

+8
View File
@@ -65,10 +65,18 @@ impl VNode {
dom: &mut VirtualDom,
to: &mut impl WriteMutations,
) {
println!(
"diffing vcomponent: {new:#?} vs {old:#?}",
new = new,
old = old
);
// Replace components that have different render fns
if old.render_fn != new.render_fn {
println!("render fns are different, replacing");
return self.replace_vcomponent(mount, idx, new, parent, dom, to);
}
println!("render fns are the same, continuing");
// copy out the box for both
let old_scope = &mut dom.scopes[scope_id.0];