Merge branch 'upstream' into optimize-templates-v3
This commit is contained in:
commit
99a4a9d45b
113 files changed
+347
-828
No files matched your search
@@ -48,7 +48,7 @@ fn main() {
|
||||
let mut dom = VirtualDom::new(app);
|
||||
let _ = dom.rebuild();
|
||||
|
||||
let pre = dioxus_ssr::pre_render_vdom(&dom);
|
||||
let pre = dioxus_ssr::pre_render(&dom);
|
||||
log::trace!("{}", pre);
|
||||
|
||||
// set the inner content of main to the pre-rendered content
|
||||
|
||||
@@ -155,7 +155,7 @@ impl WebsysDom {
|
||||
i.set_attribute(id.0 as u32, name, if *value { "true" } else { "false" }, "")
|
||||
}
|
||||
SetText { value, id } => i.set_text(id.0 as u32, value),
|
||||
NewEventListener { name, scope: _, id } => {
|
||||
NewEventListener { name, id, .. } => {
|
||||
i.new_event_listener(name, id.0 as u32, event_bubbles(&name[2..]) as u8);
|
||||
}
|
||||
RemoveEventListener { name, id } => {
|
||||
|
||||
@@ -53,8 +53,6 @@
|
||||
// - Do the VDOM work during the idlecallback
|
||||
// - Do DOM work in the next requestAnimationFrame callback
|
||||
|
||||
|
||||
|
||||
pub use crate::cfg::Config;
|
||||
use crate::dom::virtual_event_from_websys_event;
|
||||
pub use crate::util::use_eval;
|
||||
@@ -62,7 +60,6 @@ use dioxus_core::{Element, ElementId, Scope, VirtualDom};
|
||||
|
||||
use futures_util::{pin_mut, FutureExt, StreamExt};
|
||||
|
||||
|
||||
mod cache;
|
||||
mod cfg;
|
||||
mod dom;
|
||||
@@ -193,8 +190,6 @@ pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
|
||||
// } else {
|
||||
let edits = dom.rebuild();
|
||||
|
||||
log::debug!("Initial edits {:#?}", edits);
|
||||
|
||||
websys_dom.load_templates(&edits.templates);
|
||||
websys_dom.apply_edits(edits.edits);
|
||||
|
||||
@@ -216,7 +211,6 @@ pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
|
||||
_ = work => None,
|
||||
_new_template = hotreload_rx.next() => {
|
||||
todo!("Implement hot reload");
|
||||
None
|
||||
}
|
||||
evt = rx.next() => evt
|
||||
}
|
||||
@@ -252,8 +246,6 @@ pub async fn run_with_props<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
|
||||
// wait for the animation frame to fire so we can apply our changes
|
||||
// work_loop.wait_for_raf().await;
|
||||
|
||||
log::debug!("edits {:#?}", edits);
|
||||
|
||||
websys_dom.load_templates(&edits.templates);
|
||||
websys_dom.apply_edits(edits.edits);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ fn rehydrates() {
|
||||
|
||||
let mut dom = VirtualDom::new(app);
|
||||
let _ = dom.rebuild();
|
||||
let out = dioxus_ssr::render_vdom_cfg(&dom, Default::default());
|
||||
let out = dioxus_ssr::render(&dom);
|
||||
|
||||
window()
|
||||
.unwrap()
|
||||
|
||||
Reference in new issue
Block a user