Examples
Find a runnable example by API or concept. Each example has executable source, isolated state, reset behavior, and an optional runtime trace.
Start here
Approachable examples of typed messages, state, and rendering.
Typed counter
A LiveView with a count model and Decrement, Reset, and Increment messages.
Connection-local shopping cart
Typed messages update an immutable cart with derived totals and SKU-keyed rows.
State and rendering
Durable state, efficient DOM updates, lifecycle, and components.
Bounded activity stream
Durable activity history drives an opaque stream handle with stable IDs and a five-row DOM window.
Lifecycle and connection state
Connection-aware mounting, keyed flash messages, page-title projection, and after-render effects.
Voting components
Stable component instances isolate local votes while typed outputs report changes to their parent LiveView.
Async and effects
Managed work, subscriptions, cancellation, and injected services.
Managed async report
A typed task key drives deterministic success, failure, replacement, retry, and cancellation states.
Reports service injection
A layer-backed route constructor-injects a reports service while selection remains connection-local.
Managed clock subscription
An instance-scoped subscription key starts, replaces, cancels, and resets a managed clock stream.
User input
Typed forms, validation, uploads, and resource ownership.
Typed profile form
Rooted fields decode change and submit events with normalization and path-specific validation.
Summarize-and-discard text upload
One bounded text file becomes aggregate facts while its consumed bytes are immediately discarded.
Complete applications
Standalone routes that combine multiple Scalive capabilities.
Authentication lab
Sign in through ordinary HTTP, then mount and reset a protected LiveView session.