perfomance changes

This commit is contained in:
2024-11-22 11:29:00 +01:00
parent cc0ea4a9f5
commit 7f1437e779
4 changed files with 18 additions and 9 deletions
+1 -3
View File
@@ -9,13 +9,11 @@ fn main() {
fn app() -> Element {
rsx! { styling: Some(styles()),
button { class: "btn", on_click: Handler::new(|_, _, document| {
if let Some(txt) = document.get_element_by_id::<Text>("txt") {
txt.children.set_text("edited");
}
}), "Hello, World!" }
text { id: "txt", "Some text!" }
text { id: "txt", y: 2, "Some text!" }
}
}