docs: more docs and an errorhandling example

This commit is contained in:
Jonathan Kelley committed 2022-03-08 14:15:18 -05:00
1 parent 9846e0947b
commit 3acd643afb
8 files changed
+378 -33

No files matched your search

+4 -4
View File
@@ -2,16 +2,16 @@
![dioxuslogo](./images/dioxuslogo_full.png)
**Dioxus** is a framework and ecosystem for building fast, scalable, and robust user interfaces with the Rust programming language. This guide will help you get started with Dioxus running on the Web, Desktop, Mobile, and more.
**Dioxus** is a library for building fast, scalable, and robust user interfaces with the Rust programming language. This guide will help you get started with Dioxus running on the Web, Desktop, Mobile, and more.
```rust
fn app(cx: Scope) -> Element {
let (count, set_count) = use_state(&cx, || 0);
let mut count = use_state(&cx, || 0);
cx.render(rsx!(
h1 { "High-Five counter: {count}" }
button { onclick: move |_| set_count(count + 1), "Up high!" }
button { onclick: move |_| set_count(count - 1), "Down low!" }
button { onclick: move |_| count += 1, "Up high!" }
button { onclick: move |_| count -= 1, "Down low!" }
))
};
```