Merge pull request #200 from DioxusLabs/jk/no-more-buildrs

fix: remove code generation entirely
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2022-02-04 15:07:13 -05:00
commit 6f10af0cc5
12 files changed
+98 -1320

No files matched your search

+6 -3
View File
@@ -120,15 +120,18 @@ pub fn todo_entry<'a>(cx: Scope<'a, TodoEntryProps<'a>>) -> Element {
rsx!(cx, li {
class: "{completed} {editing}",
onclick: move |_| set_is_editing(true),
onfocusout: move |_| set_is_editing(false),
div { class: "view",
input { class: "toggle", r#type: "checkbox", id: "cbg-{todo.id}", checked: "{todo.checked}",
onchange: move |evt| {
cx.props.set_todos.make_mut()[&cx.props.id].checked = evt.value.parse().unwrap();
}
}
label { r#for: "cbg-{todo.id}", pointer_events: "none", "{todo.contents}" }
label {
r#for: "cbg-{todo.id}",
onclick: move |_| set_is_editing(true),
onfocusout: move |_| set_is_editing(false),
"{todo.contents}"
}
}
is_editing.then(|| rsx!{
input {