remove cx.render

This commit is contained in:
Jonathan Kelley committed 2024-01-13 21:12:21 -08:00
1 parent fae0b08e61
commit 1dde044697
159 files changed
+600 -658

No files matched your search

+7 -10
View File
@@ -10,19 +10,16 @@ fn main() {
}
fn app() -> Element {
let count = use_state(|| 0);
let mut count = use_signal(|| 0);
use_future((), move |_| {
let mut count = count.clone();
async move {
loop {
tokio::time::sleep(Duration::from_millis(1000)).await;
count += 1;
}
use_future(move |_| async move {
loop {
tokio::time::sleep(Duration::from_millis(1000)).await;
count += 1;
}
});
cx.render(rsx! {
rsx! {
div {
h1 { "Current count: {count}" }
button {
@@ -30,5 +27,5 @@ fn app() -> Element {
"Reset the count"
}
}
})
}
}