fix fullstack launch arc

This commit is contained in:
Evan Almloff committed 2024-06-18 18:48:13 -07:00
1 parent b0caf442ab
commit 24d247dc85
1 file changed
+3 -3
+3 -3
View File
@@ -50,7 +50,7 @@ pub fn launch(
contexts: Vec<Box<dyn Fn() -> Box<dyn Any + Send + Sync> + Send + Sync>>,
platform_config: Config,
) {
let factory = virtual_dom_factory(root, contexts);
let factory = virtual_dom_factory(root, Arc::new(contexts));
let cfg = platform_config.web_cfg.hydrate(true);
dioxus_web::launch::launch_virtual_dom(factory(), cfg)
}
@@ -63,7 +63,7 @@ pub fn launch(
contexts: Vec<Box<dyn Fn() -> Box<dyn Any> + Send + Sync>>,
platform_config: Config,
) -> ! {
let factory = virtual_dom_factory(root, contexts);
let factory = virtual_dom_factory(root, Arc::new(contexts));
let cfg = platform_config.desktop_cfg;
dioxus_desktop::launch::launch_virtual_dom(factory(), cfg)
}
@@ -79,7 +79,7 @@ pub fn launch(
contexts: Vec<Box<dyn Fn() -> Box<dyn Any> + Send + Sync>>,
platform_config: Config,
) {
let factory = virtual_dom_factory(root, contexts);
let factory = virtual_dom_factory(root, Arc::new(contexts));
let cfg = platform_config.mobile_cfg;
dioxus_mobile::launch::launch_virtual_dom(factory(), cfg)
}