Assert that launch never returns for better compiler errors (#2517)

* assert that launch never returns for better compiler errors

* fix static generation launch function

* fix web renderer
This commit is contained in:
Evan Almloff authored and GitHub committed 2024-06-18 16:04:36 -07:00
1 parent 5e3bb4f549
commit f4a62fad6b
5 files changed
+122 -67

No files matched your search

+2 -2
View File
@@ -16,7 +16,7 @@ pub fn launch(
for context in contexts {
vdom.insert_any_root_context(context());
}
launch_virtual_dom(vdom, platform_config);
launch_virtual_dom(vdom, platform_config)
}
/// Launch the web application with a prebuild virtual dom
@@ -30,5 +30,5 @@ pub fn launch_virtual_dom(vdom: VirtualDom, platform_config: Config) {
/// Launch the web application with the given root component and config
pub fn launch_cfg(root: fn() -> Element, platform_config: Config) {
launch_virtual_dom(VirtualDom::new(root), platform_config);
launch_virtual_dom(VirtualDom::new(root), platform_config)
}