remove cx.render
This commit is contained in:
159 files changed
+600
-658
No files matched your search
@@ -2,8 +2,8 @@ use axum::{extract::ws::WebSocketUpgrade, response::Html, routing::get, Router};
|
||||
use dioxus::prelude::*;
|
||||
|
||||
fn app() -> Element {
|
||||
let state = use_state(|| 0);
|
||||
use_future((), |_| {
|
||||
let state = use_signal(|| 0);
|
||||
use_future(|_| {
|
||||
to_owned![state];
|
||||
async move {
|
||||
loop {
|
||||
@@ -13,13 +13,13 @@ fn app() -> Element {
|
||||
}
|
||||
});
|
||||
|
||||
cx.render(rsx! {
|
||||
rsx! {
|
||||
for _ in 0..10000 {
|
||||
div {
|
||||
"hello axum! {state}"
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
|
||||
Reference in new issue
Block a user