Files
hemx/examples/v0/templates/todos.heml
T
slhx agent 3dfb3b684f 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
2026-06-05 08:56:36 +02:00

13 lines
383 B
Plaintext

<section data-hemx-root="todos">
<form data-hemx-handle="add_todo" data-hemx-form="new_todo">
<input name="title" required="required">
<button type="submit">Add</button>
</form>
<p data-hemx-slot="summary">{+ self.summary +}</p>
<ul data-hemx-slot="todo_row">
<template h-for="row in &self.rows" h-key="row.id">
{+ row +}
</template>
</ul>
</section>