feat: add panic hook by default

This commit is contained in:
Jonathan Kelley committed 2022-01-24 02:57:56 -05:00
1 parent d9a07ddddb
commit 1406c9020b
2 files changed
+8 -15

No files matched your search

+4
View File
@@ -120,6 +120,10 @@ pub fn launch_with_props<T, F>(
T: Send + 'static,
F: FnOnce(WebConfig) -> WebConfig,
{
if cfg!(feature = "panic_hook") {
console_error_panic_hook::set_once();
}
let config = configuration_builder(WebConfig::default());
wasm_bindgen_futures::spawn_local(run_with_props(root_component, root_properties, config));
}