Skip to content

Commit 0b65651

Browse files
committed
chore: setup console_error_panic_hook for example html-elements
1 parent be23724 commit 0b65651

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/html-elements/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ frender = { path = "../../packages/frender", features = ["web", "spawn"] }
1010
hooks = "3.0.0-alpha"
1111
js-sys = "0.3.66"
1212
gloo = "0.11.0"
13+
console_error_panic_hook = "0.1.7"

examples/html-elements/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ mod temp_str;
118118

119119
#[component(main(get_dom_element = "frender-root"))]
120120
fn Main() {
121+
#[cfg(debug_assertions)]
122+
console_error_panic_hook::set_once();
123+
121124
(
122125
temp_str::main(),
123126
input(),

0 commit comments

Comments
 (0)