feat: get web working properly

This commit is contained in:
Jonathan Kelley committed 2022-11-30 17:21:10 -05:00
1 parent 3c19def550
commit 18d6b1ad6f
26 files changed
+674 -1422

No files matched your search

+11 -10
View File
@@ -1,6 +1,5 @@
use crate::dom::WebsysDom;
use dioxus_core::{VNode, VirtualDom};
use dioxus_html::event_bubbles;
use wasm_bindgen::JsCast;
use web_sys::{Comment, Element, Node, Text};
@@ -30,14 +29,15 @@ impl WebsysDom {
let mut last_node_was_text = false;
// Recursively rehydrate the dom from the VirtualDom
self.rehydrate_single(
&mut nodes,
&mut counter,
dom,
root_node,
&mut last_node_was_text,
)
todo!()
// // Recursively rehydrate the dom from the VirtualDom
// self.rehydrate_single(
// &mut nodes,
// &mut counter,
// dom,
// root_node,
// &mut last_node_was_text,
// )
}
fn rehydrate_single(
@@ -164,7 +164,8 @@ impl WebsysDom {
VNode::Component(el) => {
let scope = dom.get_scope(el.scope.get().unwrap()).unwrap();
let node = scope.root_node();
self.rehydrate_single(nodes, place, dom, node, last_node_was_text)?;
todo!()
// self.rehydrate_single(nodes, place, dom, node, last_node_was_text)?;
}
VNode::TemplateRef(_) => todo!(),
}