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

+4 -4
View File
@@ -8,14 +8,14 @@ use rocket::{Config, Rocket, State};
use rocket_ws::{Channel, WebSocket};
fn app() -> Element {
let mut num = use_state(|| 0);
let mut num = use_signal(|| 0);
cx.render(rsx! {
rsx! {
div {
"hello Rocket! {num}"
button { onclick: move |_| num += 1, "Increment" }
}
})
}
}
fn index_page_with_glue(glue: &str) -> RawHtml<String> {
@@ -57,7 +57,7 @@ fn ws(ws: WebSocket, pool: &State<LiveViewPool>) -> Channel<'static> {
.await;
Ok(())
})
})
}
}
#[tokio::main]