diff --git a/examples/wasm-yew-minimal/Cargo.toml b/examples/wasm-yew-minimal/Cargo.toml index ea8d220d..0ac01839 100644 --- a/examples/wasm-yew-minimal/Cargo.toml +++ b/examples/wasm-yew-minimal/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "wasm-yew-minimal" version = "0.1.0" -authors = ["Michael Freeborn "] +authors = ["Michael Freeborn ", "Yuichi Nakamura "] edition = "2021" [dependencies] plotly = { path = "../../plotly", features = ["wasm"] } -yew = "0.19.0" -yew-hooks = "0.1.56" +yew = "0.21.0" +yew-hooks = "0.3.0" log = "0.4.6" wasm-logger = "0.2" \ No newline at end of file diff --git a/examples/wasm-yew-minimal/src/main.rs b/examples/wasm-yew-minimal/src/main.rs index 8649c03c..456bc187 100644 --- a/examples/wasm-yew-minimal/src/main.rs +++ b/examples/wasm-yew-minimal/src/main.rs @@ -19,13 +19,9 @@ pub fn plot_component() -> Html { } }); - use_effect_with_deps( - move |_| { - p.run(); - || () - }, - (), - ); + use_effect_with((), move |_| { + p.run(); + }); html! {
@@ -34,5 +30,5 @@ pub fn plot_component() -> Html { fn main() { wasm_logger::init(wasm_logger::Config::default()); - yew::start_app::(); + yew::Renderer::::new().render(); }