Skip to content

Commit f040a29

Browse files
committed
chore: setup console_error_panic_hook for example synced
1 parent 0580917 commit f040a29

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-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/synced/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ frender = { path = "../../packages/frender", features = [
1414
hooks = "3.0.0-alpha"
1515
gloo = "0.11.0"
1616
either = "1.8.1"
17+
console_error_panic_hook = "0.1.7"

examples/synced/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ impl Data {
116116

117117
#[component(main(get_dom_element = "frender-root"))]
118118
fn Main() {
119+
console_error_panic_hook::set_once();
120+
119121
// data's updates are not reactive here
120122
let data = hooks::use_mut_with(|| hooks::GenSignalHook::new(Data::new())).to_signal();
121123

0 commit comments

Comments
 (0)