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:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user