//! Simple, familiar, React-like syntax use dioxus::prelude::*; 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!" } } } //! Encapsulate state in components use dioxus::prelude::*; #[component] fn Stateful(name: String, age: u64) -> Element { rsx! {
![Dioxus](https://cdn-ak-scissors.b.st-hatena.com/image/square/2609a066fc5f13e7bb6c48a355fe2017ca581cea/height=288;version=1;width=512/https%3A%2F%2Fdioxuslabs.com%2Fstatic%2Fopengraph.png)