fix(examples): lower slot render updates

Use generated lower-aware render paths before slot HTML updates so example fragments carry runtime ids for follow-up interactions such as browser drag/drop.

req: component/003

req: runtime/001

req: examples/003
This commit is contained in:
slhx agent
2026-06-02 01:41:42 +02:00
parent 7e57366b89
commit 743f79c6d6
3 changed files with 18 additions and 18 deletions
+4 -4
View File
@@ -4,7 +4,7 @@ use axum::routing::get;
use axum::Router;
use futures_util::{stream, StreamExt};
use hemplate::Hemplate;
use slhx::{push, IntoEffect, RenderSlotExt, SafeHtml};
use slhx::{push, IntoEffect, SafeHtml};
use slhx_axum::{
interactions, runtime_js, sse, DispatchRegistry, EffectResponse, InteractionRequest, PageRequest,
};
@@ -145,7 +145,7 @@ fn registry(state: Arc<ExampleState>) -> impl DispatchRegistry {
todos.push(Todo { id, title: title.into() });
}
(
todo_slots::todo_list.render(&todos_view(&todos)),
todo_slots::todo_list.html(ui::render(&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.render(&DocsContent {
page_slots::content.html(ui::render(&DocsContent {
message: "This content came from an EffectBatch.",
}),
})),
page_slots::title.text("Docs"),
push("/docs"),
)