show panics in the toast in wasm (#4582)

This commit is contained in:
Jonathan Kelley authored and GitHub committed 2025-08-19 17:13:13 -07:00
1 parent 165447a647
commit 74163984be
7 files changed
+68 -12

No files matched your search

+3 -3
View File
@@ -51,6 +51,9 @@ pub use hydration::*;
/// wasm_bindgen_futures::spawn_local(app_fut);
/// ```
pub async fn run(mut virtual_dom: VirtualDom, web_config: Config) -> ! {
#[cfg(all(feature = "devtools", debug_assertions))]
let mut hotreload_rx = devtools::init(&web_config);
#[cfg(feature = "document")]
if let Some(history) = web_config.history.clone() {
virtual_dom.in_runtime(|| dioxus_core::ScopeId::ROOT.provide_context(history));
@@ -61,9 +64,6 @@ pub async fn run(mut virtual_dom: VirtualDom, web_config: Config) -> ! {
let runtime = virtual_dom.runtime();
#[cfg(all(feature = "devtools", debug_assertions))]
let mut hotreload_rx = devtools::init();
// If the hydrate feature is enabled, launch the client with hydration enabled
let should_hydrate = web_config.hydrate || cfg!(feature = "hydrate");