feat: add an unhygenic render macro (#556)

* feat: add an unhygenic render macro

* chore: use render instead of rsx!(cx,
This commit is contained in:
Jon Kelley authored and GitHub committed 2022-09-25 01:05:16 -07:00
1 parent 0c48cb3601
commit 28fba42e7e
28 files changed
+158 -163

No files matched your search

+4 -4
View File
@@ -9,7 +9,7 @@ fn main() {
fn app(cx: Scope) -> Element {
let val = use_state(&cx, || 5);
cx.render(rsx! {
render! {
div {
user_select: "none",
webkit_user_select: "none",
@@ -31,7 +31,7 @@ fn app(cx: Scope) -> Element {
}
}
}
})
}
}
#[derive(Props)]
@@ -78,7 +78,7 @@ pub fn Die<'a>(cx: Scope<'a, DieProps<'a>>) -> Element {
})
});
rsx!(cx,
render! {
svg {
onclick: move |e| cx.props.onclick.call(e),
prevent_default: "onclick",
@@ -97,5 +97,5 @@ pub fn Die<'a>(cx: Scope<'a, DieProps<'a>>) -> Element {
dots
}
)
}
}