feat(api): streamline generated app authoring
Move the canonical examples toward generated component-root helpers, typed form decoding, async/state handler registration, and derive-driven app/component registry wiring. Tighten requirements and diagnostics for the server-first, selectorless authoring path. Verified with cargo run -p slhx-xtask -- test, cargo check --workspace, redgate list, redgate refs, redgate health --strict, and git diff --check. req: canonical/001 req: canonical/003 req: canonical/004 req: dx/002 req: derive_app/001 req: component/003 req: form/004 req: axum_integration/003
This commit is contained in:
@@ -3,9 +3,21 @@
|
||||
<input name="title" required="required">
|
||||
<button type="submit">Add</button>
|
||||
</form>
|
||||
<ul data-slhx-slot="todo_list">
|
||||
<template h-for="todo in &self.todos" h-key="todo.id">
|
||||
<li data-slhx-slot="todo_row">{+ todo.title +}</li>
|
||||
</template>
|
||||
</ul>
|
||||
<p data-slhx-slot="summary">{+ self.summary +}</p>
|
||||
<div data-slhx-slot="todo_list">
|
||||
<ul data-slhx-slot="todo_row">
|
||||
<template h-for="todo in &self.items" h-key="todo.id">
|
||||
<li data-slhx-slot="todo_row" +data-key="todo.id">
|
||||
<span>{+ todo.title +}</span>
|
||||
<form data-slhx-handle="rename_todo">
|
||||
<input type="hidden" name="id" +value="todo.id">
|
||||
<button type="submit" name="title" value="Renamed todo">Rename</button>
|
||||
</form>
|
||||
<form data-slhx-handle="delete_todo">
|
||||
<button type="submit" name="id" +value="todo.id">Delete</button>
|
||||
</form>
|
||||
</li>
|
||||
</template>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user