dioxus/examples/readme.rs
Jonathan Kelley 8b489db5ac
fix readme
2024-02-02 15:03:46 -08:00

15 lines
302 B
Rust

use dioxus::prelude::*;
fn main() {
launch(app);
}
fn app() -> Element {
let mut count = use_signal(|| 0);
rsx! {
h1 { "High-Five counter: {count}" }
button { onclick: move |_| count += 1, "Up high!" }
button { onclick: move |_| count -= 1, "Down low!" }
}
}