Components
Author UI with the view! macro, signals, and slots — components only execute on the server.
Topics
view!
JSX-like templates, attributes, dynamic bindings.
Control flow
Show, if/match/map in view!.
Signals
use_signal, ReadSignal, WriteSignal — fine-grained reactivity.
Effects
use_effect and use_computed for derived state.
Handlers
onClick closures translated to lazy JS chunks.
Islands
computed! / effect! for client replay; #[island] optional for heavy widgets.
Client (TypeScript)
Prebuilt TS widgets — Three.js, charts — via ClientComponent.
Server actions
#[server] RPC — call Rust from the client.
js!
Escape hatch for raw client-side JavaScript.
Slots
Content projection with named slots.
NavLink
Active-state navigation links.
Form
Progressive-enhancement form submits.
Store
Structured reactive state with use_store.
Context
provide_context and use_context for descendants.
Error boundaries
load_boundary and error_boundary for failed data.
Testing
Integration tests, render snapshots, E2E.
Tasks
use_task, use_visible_task, use_debounce.
Quick example
A minimal component with resumable state:
#[component]
fn Counter() -> View {
let count = use_signal(0);
view! {
<button onClick={ move |_| count.update(|c| *c += 1) }>
{count}
</button>
}
}