3dfb3b684f
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
13 lines
383 B
Plaintext
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>
|