Clone in a terminal:
lib.rs
use leptos::prelude::*; use wasm_bindgen::prelude::*; #[component] fn Counter() -> impl IntoView { let (count, set_count) = signal(0_u32); view! { <button id="counter" on:click=move |_| set_count.update(|count| *count = count.saturating_add(1))> "Clicks: " {move || count.get()} </button> } } #[wasm_bindgen(start)] pub fn main() { mount_to_body(Counter); }

File history (1 commits)

b9a20cf Johan Mattsson - johan.mattsson.m@gmail.com
Benchmarks
Benchmarks

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112