Abstract
For over a decade, the declarative web development paradigm has been dominated by the Virtual DOM (vDOM) reconciliation model. While the vDOM abstracted imperative DOM mutations and popularized component-based user interface design, it introduced inherent runtime inefficiencies: whole-subtree re-execution, intermediate object allocations, garbage collection pressure, and coarse-grained re-rendering boundaries.
The formalization of the TC39 Signals proposal introduces standardized, fine-grained reactive primitives directly into the ECMAScript language runtime. This paper provides an architectural and theoretical analysis of TC39 Signals (Signal.State, Signal.Computed, and Signal.subtle.Watcher), examining how standardizing the reactive dependency graph enables a post-Virtual DOM web development landscape.
We evaluate push-pull evaluation models, topological glitch-free graph resolution, direct DOM surgical bindings, template cloning mechanics, resumable server-side hydration architectures, and cross-framework interoperability.
1. Introduction and Historical Context
The evolution of frontend web application architecture can be characterized by a continuous effort to manage state synchronization between application data and the browser Document Object Model (DOM).
1.1 The Imperative Era and Early Bindings (2006 to 2013)
Early rich Internet applications relied on manual DOM manipulation using libraries such as jQuery. State changes required developers to manually select DOM nodes and update attributes. As user interfaces grew in complexity, manual state synchronization caused consistency errors and tight coupling between business logic and presentation structure.
Frameworks like AngularJS introduced bidirectional data binding via dirty checking (O(N) inspection of watch lists during digest cycles), while Backbone.js utilized event-driven observable models. However, dirty checking suffered from performance degradation as the count of bound variables scaled into the thousands, and manual event dispatching frequently led to memory leaks through uncollected event listeners.
1.2 The Virtual DOM Breakthrough (2013)
In 2013, React introduced the Virtual DOM. The core premise was declarative UI as a pure projection of state:
UI = f(State)
Instead of surgically mutating DOM nodes, every state transition prompted the re-execution of the component render function. This function generated a lightweight in-memory representation of the DOM tree (the Virtual DOM tree, composed of Virtual Nodes or VNodes). The reconciliation engine compared the newly generated tree with the previous snapshot using heuristic O(N) tree differencing algorithms, computing a minimal patch of DOM mutations to commit to the browser.
While the Virtual DOM improved developer ergonomics and solved the manual synchronization problem, it introduced a structural performance ceiling.
2. The Structural Limits of the Virtual DOM Model
Although the Virtual DOM was long marketed as a performance optimization over raw DOM access, it is fundamentally an abstraction over developer ergonomics rather than raw operational efficiency. The vDOM imposes multiple runtime overheads.
2.1 Coarse Re-execution Boundaries
In standard vDOM architectures, reactivity is scoped at the component boundary. When a single piece of primitive state changes, such as a counter increment, the entire component function and all descendant components in the subtree must re-execute unless explicitly memoized via mechanisms like React.memo, useMemo, or shouldComponentUpdate.
This top-down re-evaluation requires executing user JavaScript code that is completely unrelated to the specific value that changed.
2.2 Memory Churn and Garbage Collection Pressure
Every render cycle creates thousands of transient JavaScript objects representing the VNode tree, property maps, children arrays, and closure contexts. In high-frequency interactive applications, such as data visualizations, drag interactions, audio workspaces, or dense data grids, allocating and immediately discarding these short-lived objects generates substantial heap churn, triggering engine garbage collection pauses that induce frame drops and UI stutter.
2.3 Tree Diffing Cost
Tree diffing requires traversing hierarchical structures, checking key equality, comparing property maps, and resolving array reconciliations, such as Longest Increasing Subsequence calculations for keyed lists.
Even if zero actual DOM mutations are necessary, the traversal and property comparison cost is proportional to the size of the mounted component subtree:
Diffing Overhead = Ω(Subtree VNode Count)
3. The Mechanics of Fine-Grained Signals
Fine-grained reactivity replaces component-level re-rendering with atomic, direct dependency tracking.
3.1 The Reactive Graph
A signal-based system models state as a Directed Acyclic Graph (DAG) consisting of three primary node archetypes:
- State Signals (Sources / Producers): Mutable root cells holding primitive or reference values.
- Computed Signals (Derivations / Transformers): Pure functions that consume states and other computed values, caching their derived results until an upstream dependency mutates.
- Effects / Watchers (Sinks / Consumers): Side-effect handlers that react to dependency mutations by performing external work, such as mutating a specific DOM node, scheduling a network request, or logging analytics.
3.2 Dynamic Dependency Tracking
Signals achieve dependency tracking automatically through dynamic context switching during read operations.
When a computed signal or effect runs, it establishes itself as the active evaluation context on a global execution stack. When any state signal is read during this execution, the state signal inspects the current active context and registers a bidirectional link:
- The consumer adds the source signal to its dependency set.
- The source signal adds the consumer to its subscriber set.
When execution completes, the context is popped from the stack. Because dependency tracking occurs during runtime evaluation, conditional branching naturally adapts the graph:
// Dynamic dependency tracking example
const showDetails = new Signal.State(false);
const detailData = new Signal.State("Sensitive Information");
const view = new Signal.Computed(() => {
if (showDetails.get()) {
// detailData is registered as a dependency ONLY when showDetails is true
return detailData.get();
}
return "Collapsed";
});
If showDetails is false, detailData is never read, and mutations to detailData will not trigger re-evaluation of view.
3.3 Push-Pull Evaluation and Glitch Freedom
Early reactive libraries used naive push-based propagation: whenever a source mutated, all downstream dependencies were immediately recomputed. This caused the diamond dependency problem and transient visual inconsistencies known as glitches.
Modern signals use a two-phase Push-Pull algorithm:
- Push Phase (Dirty Flag Propagation): When a source mutates, it pushes a lightweight dirty notification down its subscriber graph. Nodes mark their cached values as stale, but do not recompute their user functions yet.
- Pull Phase (Lazy Topological Evaluation): When a consumer, such as a DOM effect, requests a value, it queries its dependencies. Each dependency recursively checks if its upstream sources are dirty. If dirty, it re-evaluates in topological order, updates its cached value, and clears its dirty flag.
This guarantees that:
- Every derived value is evaluated at most once per state transition.
- Values are never read in a transient, inconsistent state (glitch freedom).
- Computed values that are currently unobserved by any active DOM watcher are never evaluated (laziness).
4. The TC39 Signals Proposal Specification
The TC39 Signals proposal standardizes fine-grained reactive primitives within the ECMAScript standard library. Rather than defining an opinionated UI rendering framework, the proposal provides low-level primitives upon which libraries, frameworks, and web components can build.
4.1 Core API Primitives
The standard library proposal exposes two primary user-facing classes and a low-level subsystem for scheduling.
4.1.1 Signal.State<T>
Represents a mutable reactive leaf node.
import { Signal } from "signal-polyfill";
const counter = new Signal.State(0);
// Reading registers a dependency if inside a reactive context
console.log(counter.get()); // 0
// Writing marks downstream subscribers as dirty
counter.set(1);
4.1.2 Signal.Computed<T>
Represents a cached, pure derived value with automated dependency tracking.
const count = new Signal.State(5);
const multiplier = new Signal.State(2);
const product = new Signal.Computed(() => {
return count.get() * multiplier.get();
});
console.log(product.get()); // 10
4.1.3 Signal.subtle.Watcher
The Watcher API provides the low-level bridge between the reactive graph and external schedulers, such as microtask queues, animation frame loops, or DOM commit pipelines.
let scheduled = false;
const watcher = new Signal.subtle.Watcher(() => {
if (!scheduled) {
scheduled = true;
queueMicrotask(processUpdates);
}
});
function processUpdates() {
scheduled = false;
// Iterate through signals that have mutated
for (const signal of watcher.getPending()) {
// Re-evaluating pulls fresh values through the reactive graph
signal.get();
}
// Re-arm watcher for subsequent mutations
watcher.watch();
}
// Attach signals to watcher
watcher.watch(product);
4.2 Why TC39 Standardization is Essential
Prior to the TC39 proposal, every modern JavaScript framework implemented its own proprietary signal system:
- SolidJS (
createSignal,createMemo) - Preact (
@preact/signals) - Vue 3 (
ref,computed) - Angular (
signal,computed) - Svelte 5 (
$state,$derivedRunes) - MobX (
observable,computed)
Because these engines share similar theoretical foundations but maintain incompatible internal object representations and dependency registries, reactive data cannot flow across framework boundaries. A signal created in a shared state store cannot be consumed by a SolidJS component, an Angular template, or a Lit web component without bespoke wrapper layers.
TC39 standardization provides:
- Zero-Overhead Cross-Framework Interoperability: Web components, third-party libraries, and disparate framework components can subscribe to the same shared reactive state graph.
- Engine-Level Micro-Optimizations: Browser JavaScript engines (V8, JavaScriptCore, SpiderMonkey) can optimize signal structs at the C++ level, implementing intrusive linked lists and compact bitfield flags directly inside engine memory heaps.
- Universal State Management Ecosystems: State management, validation, and networking libraries can be authored once against standard
Signalprimitives rather than maintaining separate plugins for each framework ecosystem.
5. The Post-Virtual DOM Architecture
With fine-grained signals natively available, UI frameworks can discard the Virtual DOM entirely in favor of direct DOM bindings and compiled template cloning.
5.1 Template Cloning via cloneNode
Instead of calling nested virtual node factory functions (React.createElement or jsx()) on every state change, modern post-vDOM compilers compile declarative templates into static HTML templates at build time.
During initialization:
- The static DOM structure is serialized into an HTML
<template>element once. - Creating an instance of a component requires a single native
template.content.cloneNode(true)browser call, executed in high-performance C++ engine code. - The compiler generates precise DOM navigation paths, using
firstChildandnextSiblingwalks, to acquire references only to dynamic nodes. - Each dynamic node binding is wrapped in a fine-grained effect that listens directly to the underlying signal.
// Conceptual compiled output of a Post-vDOM component
function CounterComponent() {
const count = new Signal.State(0);
// 1. Clone static structure once
const root = templateRoot.cloneNode(true);
const incrementBtn = root.firstChild;
const countDisplay = incrementBtn.nextSibling;
// 2. Attach static event listener
incrementBtn.addEventListener("click", () => count.set(count.get() + 1));
// 3. Bind dynamic expression directly via Watcher
createDomEffect(() => {
countDisplay.textContent = count.get();
});
return root;
}
When count changes:
- The component function
CounterComponentdoes not re-execute. - No Virtual DOM nodes are created.
- No tree diffing occurs.
- The exact text node
countDisplay.textContentis updated directly in the DOM.
5.2 Elimination of Component Lifecycle Boundaries
In the post-vDOM architecture, components are not long-lived runtime instances that maintain state and continuously re-render. A component is merely an initialization function that runs exactly once to set up the reactive graph and DOM bindings, and then immediately relinquishes control.
6. Performance, Memory, and Server-Side Hydration
6.1 Algorithmic Complexity Comparison
The architectural shift from Virtual DOM tree diffing to fine-grained signal propagation fundamentally alters asymptotic runtime complexity:
Operational Metric | Virtual DOM (e.g., React) | Fine-Grained Signals (e.g., Post-vDOM) |
|---|---|---|
Component Re-evaluation on State Change | O(Subtree Size) | O(1) (Zero component execution) |
Heap Allocations per Mutation | O(VNode Count) | O(1) (Zero VNode allocations) |
DOM Mutation Location Resolution | O(N) Tree Differencing | O(1) Direct Node Reference |
Initial Mount Execution | Template parsing + VNode creation |
|
Dynamic Array Reordering | Keyed diffing algorithm | Keyed block index reconciliation |
6.2 Hydration and Resumability
A major bottleneck of modern web applications is hydration: after the server renders HTML, the client must download the entire JavaScript bundle, re-execute all component functions to rebuild the in-memory Virtual DOM tree, attach event listeners, and reconcile client state with the server DOM.
In a signal-based post-vDOM architecture, hydration overhead can be minimized through fine-grained resumability:
- Serialized Signal Graphs: The server serializes the state of all
Signal.Statenodes into a compact JSON manifest. - Selective Hydration: The client loads the initial DOM without executing component initialization trees. Event listeners are bound lazily, and reactive effects are attached only when an interactive signal mutates or enters the viewport.
- Zero VNode Reconstruction: Because there is no Virtual DOM tree to reconstruct, the client avoids the heavy initial CPU execution phase that causes long Time-to-Interactive (TTI) latencies.
7. Comparative Framework Analysis
Architectural Dimension | React 19 (Compiler + vDOM) | Vue 3.5 (Hybrid / Vapor) | Svelte 5 (Runes) | SolidJS (Fine-Grained) | TC39 Native Signals |
|---|---|---|---|---|---|
Underlying Reactivity | Immutability / Hook closures | Proxy-based tracking | Runes compiler signals | Function closures / Signals | Standardized Native Class |
Rendering Strategy | Virtual DOM (Optimized diff) | Hybrid / Vapor (No vDOM) | Direct DOM mutations | Direct DOM mutations | Framework Agnostic |
Component Execution | Re-runs on every render | Setup runs once; render re-runs | Setup runs once | Setup runs once | N/A (Standard Primitive) |
Interoperability | React proprietary | Vue proprietary | Svelte proprietary | Solid proprietary | Universal ECMAScript |
W3C Web Component Synergy | Requires wrapper adapters | Good integration | Custom elements export | Custom elements export | Native direct binding |
8. Open Challenges, Edge Cases, and Future Directions
While fine-grained signals provide distinct architectural advantages over the Virtual DOM, several engineering challenges must be addressed.
8.1 Memory Leak Prevention and Graph Lifecycle Management
Because signal dependencies form bidirectional references between state sources and consumer effects, active subscriptions can prevent garbage collection if consumers are discarded without explicit unsubscription. Frameworks must implement automated disposal contexts, such as cleanup scopes tied to DOM node disconnections, to prevent memory leaks in dynamic single-page applications.
8.2 Complex List and Collection Reconciliation
While primitive scalar bindings, such as updating text or attributes, are optimal in signal architectures, dynamic collections, including sorting, filtering, inserting, and deleting items in lists containing tens of thousands of rows, still require efficient list diffing algorithms.
Signal frameworks solve this by combining signal primitives with specialized list reconcile blocks that track node movements with minimal DOM insertions and deletions.
8.3 Debugging and Developer Tooling
In a component-based vDOM architecture, stack traces follow the structured hierarchy of the component tree. In a fine-grained signal architecture, execution jumps across topological graph queues, which can obscure causality chains during debugging.
Standardized browser developer tools will need to introduce native Reactive Graph visualizers that inspect active Signal dependency webs directly in the DevTools performance panel.
9. Conclusion
The Virtual DOM was a critical stepping stone in the history of web software engineering, liberating developers from manual imperative DOM synchronization and establishing the foundation for declarative UI design. However, the costs associated with coarse-grained component re-execution, VNode object allocation, and tree diffing represent fundamental limitations in high-performance application architectures.
The TC39 Signals proposal standardizes fine-grained push-pull reactivity at the language level. By replacing component-scoped re-evaluation with atomic dependency graphs, and pairing these graphs with compiled template cloning, the post-Virtual DOM paradigm achieves direct, surgical DOM updates, minimal memory footprints, and cross-framework state interoperability.
As TC39 Signals progresses through the standardization lifecycle, it paves the way for a faster, leaner, and more cohesive web development ecosystem.
10. References
Bainomugisha, E., Carreton, A. L., Cutsem, T. V., Mostinckx, S., & Meuter, W. D. (2013). A survey on reactive programming. ACM Computing Surveys, 45(4), 1–34. https://doi.org/10.1145/2501654.2501666
Cooper, G. H., & Krishnamurthi, S. (2006). Embedding dynamic dataflow in a call-by-value language. In P. Sestoft (Ed.), Programming languages and systems (Lecture Notes in Computer Science, Vol. 3924, pp. 294–308). Springer. https://doi.org/10.1007/11693024_20
Elliott, C., & Hudak, P. (1997). Functional reactive animation. In Proceedings of the second ACM SIGPLAN international conference on functional programming (pp. 263–273). Association for Computing Machinery. https://doi.org/10.1145/258948.258973
Hunt, J. W., & Szymanski, T. G. (1977). A fast algorithm for computing longest common subsequences. Communications of the ACM, 20(5), 350–353. https://doi.org/10.1145/359581.359603
Kjolstad, F., & Dig, D. (2015). Transformation-based refactoring for reactive programming. In Proceedings of the 37th international conference on software engineering (pp. 139–149). IEEE. https://doi.org/10.1109/ICSE.2015.36
Meijer, E. (2012). Your mouse is a database. Communications of the ACM, 55(5), 72–83. https://doi.org/10.1145/2160718.2160735
Salter, D., & Falsina, L. (2024). Proposal-signals: A JavaScript standard for signals (TC39 Stage 1 / Stage 2 Draft Specification). Ecma International. https://github.com/tc39/proposal-signals
Vue.js Core Team. (2024). Vapor mode architectural specification. Vue.js Foundation. https://github.com/vuejs/core-vapor
World Wide Web Consortium. (2024). DOM standard: Living specification (W3C Recommendation). WHATWG. https://dom.spec.whatwg.org/



No comments yet