diff --git a/Cargo.toml b/Cargo.toml index c17c7ed..ab9a296 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,5 @@ edition = "2021" [dependencies] plotly = { version = "0.8.4", features = ["wasm"] } -yew = "0.19.0" -yew-hooks = "0.1.56" -log = "0.4.6" -wasm-logger = "0.2" +yew = "0.21.0" +yew-hooks = "0.3.0" diff --git a/src/main.rs b/src/main.rs index 8649c03..94cf9bf 100644 --- a/src/main.rs +++ b/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! {
@@ -33,6 +29,5 @@ pub fn plot_component() -> Html { } fn main() { - wasm_logger::init(wasm_logger::Config::default()); - yew::start_app::(); + yew::Renderer::::new().render(); }