feat(build): add lower-aware put helper
Generate ui::put(slot, view) for lower-aware slot HTML updates and move examples/docs/contracts to that ergonomic path instead of hand-composing slot.html(render(...)). req: dx/006 req: component/003 req: runtime/001 req: examples/003
This commit is contained in:
@@ -145,7 +145,7 @@ fn registry(state: Arc<ExampleState>) -> impl DispatchRegistry {
|
||||
todos.push(Todo { id, title: title.into() });
|
||||
}
|
||||
(
|
||||
todo_slots::todo_list.html(ui::render(&todos_view(&todos))),
|
||||
todos::put(todo_slots::todo_list, &todos_view(&todos)),
|
||||
todo_forms::new_todo.clear("title"),
|
||||
)
|
||||
}
|
||||
@@ -172,9 +172,9 @@ fn registry(state: Arc<ExampleState>) -> impl DispatchRegistry {
|
||||
.on(page_handles::load_docs, |_| {
|
||||
// req: page_swap/002, req: examples/001
|
||||
(
|
||||
page_slots::content.html(ui::render(&DocsContent {
|
||||
page_swap::put(page_slots::content, &DocsContent {
|
||||
message: "This content came from an EffectBatch.",
|
||||
})),
|
||||
}),
|
||||
page_slots::title.text("Docs"),
|
||||
push("/docs"),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user