Examples
Find a runnable example by API or concept. Each example has executable source, isolated state, reset behavior, and an optional runtime trace.
For Forms, progress from the typed profile form, through stable repeated contact rows, to the form save workflow. Together they cover the basic change/submit loop, keyed structural edits, and persistence concurrency.
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, connected resources, cancellation, and injected services.
Managed async report
A typed task key drives deterministic success, failure, replacement, retry, and cancellation states.
Component-owned subscriptions
Two component instances reuse one local subscription key while independently starting, replacing, cancelling, and surviving brief removal.
Connected lifecycle registration
A connected mount acquires one registration handle and releases that exact handle when its LiveView lifecycle closes.
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.
Form save workflow
Revision-bound submission tokens coordinate dirty state, persistence responses, stale completions, and reset.
Typed profile form
Schema-owned fields and a typed submitter rebuild validated profile previews and saves from native form events.
Stable repeated contact rows
Caller-provided row keys preserve contact identity while typed form operations add, remove, and reorder rows.
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.