Internals
How Reactive works underneath. Using the framework needs none of this. The runtime is small and deliberately plain, so if you want to understand or extend it, everything is laid out here: the architecture, the data structures, how state keeps its identity, the update loop, and the annotated source itself.
The shape of it
Architecture →
Reactive is a hand-written substrate that hosts swappable interpreters. A program is just
calls on Reactive; swapping the interpreter runs it, type-checks it, or generates code from it.
Data structures →
Plain tagged objects, no classes. A value is a readable half and a writable half; a lock carries loading or an error. What everything is made of.
Identity →
How a piece of state stays the same piece across re-runs: a scope tree that branches at
every If and Each, so identity is a path rather than a position.
Update loop →
Run the program, gather what it emits, reconcile it onto the page; a Set schedules another
pass. The whole cycle in one place.
Source →
The annotated source of Reactive.js, section by section: the substrate, the
define and run interpreters, and the DOM driver.
One idea holds it together
Everything a program does is a call on a single swappable object. Keep those calls pure and the meaning of the program is decided entirely by which interpreter is installed, so the same code can run, be checked, or be compiled. That one discipline is why the runtime stays small while the ceiling stays high; the architecture page starts there.