feat(slhx): prefer render methods for views

Move view rendering onto Slot::render and KeyedSlot append/prepend/replace extension methods, leaving explicit text/html methods for non-view escape hatches.

req: codegen/002

req: view/001
This commit is contained in:
slhx agent
2026-05-26 01:31:58 +02:00
parent ba3f40a3f0
commit 5972785c3c
10 changed files with 61 additions and 40 deletions
+2 -2
View File
@@ -136,7 +136,7 @@ fn registry(state: Arc<ExampleState>) -> HandlerRegistry {
todos.push(Todo { id, title: title.into() });
}
(
ui::todos::slots::todo_list.render_view(&todos_view(&todos)),
ui::todos::slots::todo_list.render(&todos_view(&todos)),
ui::todos::forms::new_todo.clear("title"),
)
}
@@ -163,7 +163,7 @@ fn registry(state: Arc<ExampleState>) -> HandlerRegistry {
.register_handle(ui::page_swap::handles::load_docs, |_| {
// req: page_swap/002, req: examples/001
(
ui::page_swap::slots::content.render_view(&DocsContent {
ui::page_swap::slots::content.render(&DocsContent {
message: "This content came from an EffectBatch.",
}),
ui::page_swap::slots::title.text("Docs"),