feat(hemx): reuse todo row partials
Make the canonical v0 todo flow use one TodoRow partial shape for initial list rendering and generated keyed append/replace/remove helpers. Teach hemx-build to treat collection hosts with keyed h-for children as keyed targets, so beginner templates can keep the DRY outer slot + child partial composition. req: canonical_authoring/002 req: canonical_authoring/003 req: examples/004 req: list/001
This commit is contained in:
@@ -69,12 +69,12 @@ mod tests {
|
||||
fn form_handler_is_checked_against_hemplate_form() {
|
||||
#[hemx::handler]
|
||||
fn add_todo(_form: hemx::Form<TodoInput>) -> impl IntoEffect {
|
||||
todos::todo_list.set("queued")
|
||||
todos::summary.set("queued")
|
||||
}
|
||||
|
||||
let effect = inspect(add_todo(TodoInput::FORM));
|
||||
|
||||
assert!(effect.updates_text(todos::todo_list));
|
||||
assert!(effect.updates_text(todos::summary));
|
||||
}
|
||||
|
||||
// req: examples/001 req: progressive_disclosure/001 req: build/001 req: build/005 req: codegen/002
|
||||
|
||||
Reference in New Issue
Block a user