mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
fix warning, set initial value of counter
This commit is contained in:
parent
80287f7a61
commit
cd59bf5a10
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ use leptos::*;
|
|||
/// - **step** [`i32`] - The change that should be applied on each step.
|
||||
#[component]
|
||||
pub fn SimpleCounter(cx: Scope, initial_value: i32, step: i32) -> web_sys::Element {
|
||||
let (value, set_value) = create_signal(cx, 0);
|
||||
let (value, set_value) = create_signal(cx, initial_value);
|
||||
|
||||
view! { cx,
|
||||
<div>
|
||||
|
|
Loading…
Reference in a new issue