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:
@@ -77,7 +77,7 @@ mod tests {
|
||||
fn todos_append_keyed_rows_from_form_input() {
|
||||
fn add_todo(input: TodoInput) -> impl IntoEffect {
|
||||
let todo = Todo { id: 7, title: input.title };
|
||||
ui::slots::todo_row.append_view(
|
||||
ui::slots::todo_row.append(
|
||||
todo.id.to_string(),
|
||||
&TodoRow { title: todo.title },
|
||||
)
|
||||
@@ -121,7 +121,7 @@ mod tests {
|
||||
fn page_swap_updates_content_and_history() {
|
||||
fn load_docs() -> impl IntoEffect {
|
||||
(
|
||||
ui::slots::content.render_view(&DocsContent {
|
||||
ui::slots::content.render(&DocsContent {
|
||||
message: "This page was swapped.",
|
||||
}),
|
||||
ui::slots::title.text("Docs"),
|
||||
|
||||
Reference in New Issue
Block a user