Files
livevue-rs/examples/todo/about.rs
T
2026-03-08 20:10:15 +01:00

40 lines
1.5 KiB
Rust

use livevue_rs::RenderContext;
use maud::{html, Markup};
pub async fn about(_cx: &mut RenderContext) -> anyhow::Result<Markup> {
Ok(html! {
div.about-page {
h1 { "About LiveVue.rs" }
nav {
button.nav-link
data-on:click="$tree = {page: 'TodoList'}" {
"Todos"
}
" | "
span.nav-current { "About" }
}
div.about-content {
p {
"LiveVue.rs is a reactive server-side rendering framework for Rust. "
"The server renders full-page HTML on every state change. "
"DataStar morphs it into the DOM."
}
p {
"The architectural bet: "
strong { "full rerender is cheap" }
", so skip diffing, skip partial updates, skip client-side state management."
}
h2 { "Architecture" }
ul {
li { "Actions post signals → 202, no response body" }
li { "Rerenders come down the SSE pipe from the fanout task" }
li { "KV store writes auto-publish broadcast invalidation events" }
li { "SubscriptionRegistry maps CacheKeys → connections" }
li { "Clock ticks via " code { "store.kv.set(\"clock\", ...)" } " every second" }
}
}
}
})
}