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

+6 -6
View File
@@ -7,9 +7,9 @@ fn main() {
}
fn app() -> Element {
let val = use_state(|| 5);
let val = use_signal(|| 5);
cx.render(rsx! {
rsx! {
div {
user_select: "none",
webkit_user_select: "none",
@@ -31,7 +31,7 @@ fn app() -> Element {
}
}
}
})
}
}
#[derive(Props)]
@@ -58,7 +58,7 @@ const UNHELD_COLOR: &str = "#ddd";
// A six-sided die (D6) with dots.
#[allow(non_snake_case)]
pub fn Die(props: DieProps -> Element {
pub fn Die(props: DieProps) -> Element {
let &DieProps { value, keep, .. } = cx.props;
let active_dots = &DOTS_FOR_VALUE[(value - 1) as usize];
@@ -81,7 +81,7 @@ pub fn Die(props: DieProps -> Element {
}
});
cx.render(rsx! {
rsx! {
svg {
onclick: move |e| cx.props.onclick.call(e),
prevent_default: "onclick",
@@ -99,5 +99,5 @@ pub fn Die(props: DieProps -> Element {
{dots}
}
})
}
}