depreciate the render macro

This commit is contained in:
Evan Almloff committed 2024-01-16 13:18:46 -06:00
1 parent 90d0164b9e
commit e65c5f0eb3
148 files changed
+459 -458

No files matched your search

+3 -3
View File
@@ -14,10 +14,10 @@ fn app() -> Element {
// todo: i'd like it for children on elements to be inferred as the children of the element
// also should shorthands understand references/dereferences?
// ie **a, *a, &a, &mut a, etc
let children = render! { "Child" };
let children = rsx! { "Child" };
let onclick = move |_| println!("Clicked!");
render! {
rsx! {
div { class, id, {&children} }
Component { a, b, c, children, onclick }
Component { a, ..ComponentProps { a: 1, b: 2, c: 3, children: None, onclick: Default::default() } }
@@ -26,7 +26,7 @@ fn app() -> Element {
#[component]
fn Component(a: i32, b: i32, c: i32, children: Element, onclick: EventHandler<()>) -> Element {
render! {
rsx! {
div { "{a}" }
div { "{b}" }
div { "{c}" }