restore replace optimization

This commit is contained in:
Evan Almloff committed 2024-01-15 09:59:50 -06:00
1 parent 9133c0a305
commit a8172b0ab5
5 files changed
+58 -44

No files matched your search

+3 -5
View File
@@ -112,12 +112,10 @@ impl VNode {
) {
let scope = ScopeId(dom.mounts[mount.0].mounted_dynamic_nodes[idx]);
let _m = self.create_component_node(mount, idx, new, parent, dom, to);
let m = self.create_component_node(mount, idx, new, parent, dom, to);
// TODO: Instead of *just* removing it, we can use the replace mutation
dom.remove_component_node(to, scope, true);
todo!()
// Instead of *just* removing it, we can use the replace mutation
dom.remove_component_node(to, scope, Some(m), true);
}
pub(super) fn create_component_node(