Flux’s reactivity is SolidJS-style: a fine-grained dependency graph over signals, not a virtual-diffing re-render loop. And Flux’s state is host-authoritative: the server never owns runtime signal values — it ships structure (the IR) and deltas (patches), while the host owns the signal graph, evaluates handlers, and reconciles the view.
The invariant
Section titled “The invariant”After a dispatch writes signal set
S, the only nodes whose rendered output may change are (a) nodes whose prop/control expressions read somes ∈ S, and (b) nodes built/destroyed/reordered by keyed structural diffs triggered by (a). Everything else must be untouched.
This invariant is normative (ADR-0027), and it is what makes a 1,000-node tree cost one update when you tap a counter bound to a single signal — independent of tree size.
How a dispatch flows
Section titled “How a dispatch flows”- Dispatch — a tap evaluates the handler closure in the host VM,
writing one or more signals (for example
count = count + 1). - Signals — the VM reports the written signal ids, sorted ascending,
as the
signalstrace event. - Dirty set — the host intersects the written signals with each node’s
signal_deps, emitting adirtylist in(depth asc, id asc)order. - Update — only the dirty nodes re-materialize their props and fire
update. Clean siblings are untouched. - Step end — cumulative counters close the step:
built,updated,skipped_unchanged,detached,prop_materializations.
A handler that writes a signal nothing reads produces dirty: [] and zero
update/build/detach events — the noop_dispatch golden scenario pins this.
Consequences
Section titled “Consequences”- Patches are minimal. A
count = count + 1tap produces anUpdatepatch addressed to the dirty node(s) only, never a re-send of the whole tree. - Trace parity is observable. Because state is host-owned and deterministic, the same frame + dispatch script run against Swift and Kotlin yields byte-identical traces — that is the parity harness’s job.
- The server round-trip is on its way out. Phase 3 of ADR-0027 ships
prop thunks to the host, so the per-tap server round-trip and the
currentFrame()reconstruction disappear entirely; the host recomputes from the dirty set.
What this rules out
Section titled “What this rules out”The same discipline explains the fault policy you meet in practice: when a handler faults, the node keeps its prior props (render stale, never blank), and the error surfaces through the overlay and the trace — the view is never torn down.
Where to see it
Section titled “Where to see it”The counter example is the canonical demonstration: one signal, one
dependent Text, and a tap that costs exactly one update while the Column
and Button skip unchanged. The todo tutorial shows
the same mechanics with lists and routing layered on top.
Next steps
Section titled “Next steps”- Dev vs release — how the two execution tiers share this machinery.
- Architecture — the crates that implement the graph and the dirty set.
