use queue_events instead of process_events to fix ssr issue (#4772)
* use `queue_events` instead of `process_events` to fix ssr issue * remove suspense wait from liveview
This commit is contained in:
1 parent
01db142750
commit
76319005b8
3 files changed
+3
-11
No files matched your search
@@ -11,7 +11,7 @@ use dioxus_html::{EventData, HtmlEvent, PlatformEventData};
|
||||
use dioxus_interpreter_js::MutationState;
|
||||
use futures_util::{pin_mut, SinkExt, StreamExt};
|
||||
use serde::Serialize;
|
||||
use std::{any::Any, rc::Rc, time::Duration};
|
||||
use std::{any::Any, rc::Rc};
|
||||
use tokio_util::task::LocalPoolHandle;
|
||||
|
||||
#[derive(Clone)]
|
||||
@@ -238,12 +238,6 @@ pub async fn run(mut vdom: VirtualDom, ws: impl LiveViewSocket) -> Result<(), Li
|
||||
}
|
||||
}
|
||||
|
||||
// wait for suspense to resolve in a 10ms window
|
||||
tokio::select! {
|
||||
_ = tokio::time::sleep(Duration::from_millis(10)) => {}
|
||||
_ = vdom.wait_for_suspense() => {}
|
||||
}
|
||||
|
||||
// render the vdom
|
||||
vdom.render_immediate(&mut mutations);
|
||||
|
||||
|
||||
Reference in new issue
Block a user