fix warning, set initial value of counter

This commit is contained in:
Sarah Allen 2022-12-21 07:11:15 -08:00
parent 80287f7a61
commit cd59bf5a10

View file

@ -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>