implement hydration

This commit is contained in:
Evan Almloff committed 2023-01-31 14:10:48 -06:00
1 parent e9dd5a94c7
commit 696109db10
6 files changed
+280 -168

No files matched your search

+8 -2
View File
@@ -22,9 +22,11 @@ use crate::Config;
pub struct WebsysDom {
document: Document,
#[allow(dead_code)]
pub(crate) root: Element,
templates: FxHashMap<String, u32>,
max_template_id: u32,
interpreter: Channel,
pub(crate) interpreter: Channel,
}
pub struct UiEvent {
@@ -72,10 +74,14 @@ impl WebsysDom {
}
}));
dioxus_interpreter_js::initilize(root.unchecked_into(), handler.as_ref().unchecked_ref());
dioxus_interpreter_js::initilize(
root.clone().unchecked_into(),
handler.as_ref().unchecked_ref(),
);
handler.forget();
Self {
document,
root,
interpreter,
templates: FxHashMap::default(),
max_template_id: 0,