From bfef94e77f7e419f30dd5dcad8c916f5f8ebe4b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Mar=C3=ADn?= <62134857+mariinkys@users.noreply.github.com> Date: Wed, 25 Dec 2024 03:24:12 +0100 Subject: [PATCH] chore(deps): update leptos template to leptos 0.7 (#861) --- templates/template-leptos/Cargo.toml.lte | 2 +- templates/template-leptos/src/app.rs.lte | 8 ++++---- templates/template-leptos/src/main.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/template-leptos/Cargo.toml.lte b/templates/template-leptos/Cargo.toml.lte index 4a44efb7ba..a5149e5794 100644 --- a/templates/template-leptos/Cargo.toml.lte +++ b/templates/template-leptos/Cargo.toml.lte @@ -5,7 +5,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -leptos = { version = "0.6", features = ["csr"] } +leptos = { version = "0.7", features = ["csr"] } wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" js-sys = "0.3" diff --git a/templates/template-leptos/src/app.rs.lte b/templates/template-leptos/src/app.rs.lte index dab365cf79..c048e0a875 100644 --- a/templates/template-leptos/src/app.rs.lte +++ b/templates/template-leptos/src/app.rs.lte @@ -1,5 +1,5 @@ -use leptos::leptos_dom::ev::SubmitEvent; -use leptos::*; +use leptos::task::spawn_local; +use leptos::{ev::SubmitEvent, prelude::*}; use serde::{Deserialize, Serialize}; use wasm_bindgen::prelude::*; @@ -16,8 +16,8 @@ struct GreetArgs<'a> { #[component] pub fn App() -> impl IntoView { - let (name, set_name) = create_signal(String::new()); - let (greet_msg, set_greet_msg) = create_signal(String::new()); + let (name, set_name) = signal(String::new()); + let (greet_msg, set_greet_msg) = signal(String::new()); let update_name = move |ev| { let v = event_target_value(&ev); diff --git a/templates/template-leptos/src/main.rs b/templates/template-leptos/src/main.rs index 0d8bac9b3d..4fcc0ff37a 100644 --- a/templates/template-leptos/src/main.rs +++ b/templates/template-leptos/src/main.rs @@ -1,7 +1,7 @@ mod app; use app::*; -use leptos::*; +use leptos::prelude::*; fn main() { console_error_panic_hook::set_once();