remove cx.render
This commit is contained in:
159 files changed
+600
-658
No files matched your search
@@ -54,9 +54,9 @@ Dioxus は、Rust でクロスプラットフォームのユーザー・イン
|
||||
|
||||
```rust
|
||||
fn app() -> Element {
|
||||
let mut count = use_state(|| 0);
|
||||
let mut count = use_signal(|| 0);
|
||||
|
||||
cx.render(rsx! {
|
||||
rsx! {
|
||||
h1 { "High-Five counter: {count}" }
|
||||
button { onclick: move |_| count += 1, "Up high!" }
|
||||
button { onclick: move |_| count -= 1, "Down low!" }
|
||||
|
||||
@@ -58,9 +58,9 @@
|
||||
|
||||
```rust
|
||||
fn app() -> Element {
|
||||
let mut count = use_state(|| 0);
|
||||
let mut count = use_signal(|| 0);
|
||||
|
||||
cx.render(rsx! {
|
||||
rsx! {
|
||||
h1 { "High-Five counter: {count}" }
|
||||
button { onclick: move |_| count += 1, "Up high!" }
|
||||
button { onclick: move |_| count -= 1, "Down low!" }
|
||||
|
||||
Reference in new issue
Block a user