feat(build): generate keyed view commands
Add lower-aware generated append/prepend/replace helpers for keyed slots, move the v0 keyed todo example off the facade extension trait, and keep beginner examples from importing lower-level render shortcuts. req: dx/006 req: codegen/002 req: public_api/003 req: examples/003
This commit is contained in:
@@ -5,7 +5,7 @@ pub mod ui {}
|
||||
mod tests {
|
||||
use super::ui::{auth, counter, notifications, page_swap, todos, wizard};
|
||||
use hemplate::Hemplate;
|
||||
use slhx::{push, Effect, IntoEffect, NavigateMode, Payload, RenderKeyedSlotExt};
|
||||
use slhx::{push, Effect, IntoEffect, NavigateMode, Payload};
|
||||
use slhx_test::inspect;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
@@ -77,7 +77,8 @@ 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 };
|
||||
todos::slots::todo_row.append(
|
||||
todos::append(
|
||||
todos::slots::todo_row,
|
||||
todo.id.to_string(),
|
||||
&TodoRow { title: todo.title },
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user