remove cx.render
This commit is contained in:
159 files changed
+600
-658
No files matched your search
@@ -19,10 +19,10 @@ fn app(cx: Scope<AppProps>) -> Element {
|
||||
let state =
|
||||
use_server_future((), |()| async move { get_server_data().await.unwrap() })?.value();
|
||||
|
||||
let mut count = use_state(|| 0);
|
||||
let text = use_state(|| "...".to_string());
|
||||
let mut count = use_signal(|| 0);
|
||||
let text = use_signal(|| "...".to_string());
|
||||
|
||||
cx.render(rsx! {
|
||||
rsx! {
|
||||
div {
|
||||
"Server state: {state}"
|
||||
}
|
||||
@@ -43,7 +43,7 @@ fn app(cx: Scope<AppProps>) -> Element {
|
||||
"Run a server function!"
|
||||
}
|
||||
"Server said: {text}"
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[server(PostServerData)]
|
||||
|
||||
Reference in new issue
Block a user