wip: pre vnodes instead of vnode

This commit is contained in:
Jonathan Kelley committed 2021-06-08 14:00:29 -04:00
1 parent e3d9db0847
commit fe6938ceb3
21 files changed
+303 -441

No files matched your search

+4 -6
View File
@@ -8,15 +8,13 @@
Dioxus is a portable, performant, and ergonomic framework for building cross-platform user experiences in Rust.
```rust
fn Example(ctx: Context<()>) -> VNode {
fn Example(ctx: Context<()>) -> VNodes {
let (selection, set_selection) = use_state(&ctx, move || "..?");
ctx.render(rsx! {
div {
h1 { "Hello, {selection}" }
button { "?", onclick: move |_| set_selection("world!")}
button { "?", onclick: move |_| set_selection("Dioxus 🎉")}
}
h1 { "Hello, {selection}" }
button { "?", onclick: move |_| set_selection("world!")}
button { "?", onclick: move |_| set_selection("Dioxus 🎉")}
})
};
```