AboutBlogContact
Web DevelopmentJune 18, 2021 2 min read 318Updated: May 3, 2026

SolidJS: Fine-Grained Reactivity and the Death of the Virtual DOM (2021)

AunimedaAunimeda
📋 Table of Contents

SolidJS: Fine-Grained Reactivity and the Death of the Virtual DOM

It's 2021, and the "Virtual DOM" (VDOM) is starting to feel like a tax we don't need to pay. React, Vue, and even Svelte (to an extent) use some form of diffing or component-level invalidation.

SolidJS takes a completely different approach: fine-grained reactivity.

No Virtual DOM?

In Solid, your components run once. Yes, only once. There is no "re-render" cycle where the whole function executes again to figure out what changed. Instead, the JSX is compiled into direct DOM operations that are wrapped in reactive "effects."

Signals, Memos, and Effects

Solid uses createSignal for state. When you call the setter, only the specific parts of the DOM that subscribed to that signal are updated.

import { createSignal, onCleanup } from "solid-js";

function Counter() {
  const [count, setCount] = createSignal(0);
  
  // This interval runs once.
  const timer = setInterval(() => setCount(c => c + 1), 1000);
  onCleanup(() => clearInterval(timer));

  // The <div> and <h1> are created once.
  // ONLY the text node inside <h1> is updated when count changes.
  return (
    <div>
      <h1>Count: {count()}</h1>
    </div>
  );
}

Compiled to the Metal

Solid's compiler is incredibly smart. It looks at your JSX and turns it into document.createElement and textContent updates. It’s nearly as fast as vanilla JS because it basically is vanilla JS with a powerful subscription engine.

Why This Matters

  1. Predictable Performance: No "re-render" bottlenecks or useMemo / useCallback boilerplate.
  2. Smaller Bundles: No heavy VDOM runtime library to ship.
  3. Real DOM Nodes: You're working with actual DOM elements, which makes integration with 3rd party libraries easier.

In 2021, we're realizing that the best way to optimize the DOM is to stop guessing what changed and start knowing what changed.


Aunimeda develops websites and web applications for businesses - corporate sites, e-commerce, portals, and custom platforms.

Contact us to discuss your web project. See also: Web Development, E-commerce Development

Read Also

Next.js 9.5: Incremental Static Regeneration (ISR) is a Game Changer (2020)aunimeda
Web Development

Next.js 9.5: Incremental Static Regeneration (ISR) is a Game Changer (2020)

Next.js 9.5 just dropped, and ISR is the answer to our 'static vs. dynamic' prayers. Fast TTFB meets real-time data.

Svelte 3: The Framework that Disappears (2019)aunimeda
Web Development

Svelte 3: The Framework that Disappears (2019)

Svelte 3 is here, and it's doing away with the Virtual DOM entirely. Reactivity is now a language feature, not a library feature.

The TypeScript Tipping Point: Why We Stopped Shipping Raw JavaScript in 2018aunimeda
Web Development

The TypeScript Tipping Point: Why We Stopped Shipping Raw JavaScript in 2018

The days of 'undefined is not a function' are numbered. In 2018, we have officially moved all new agency projects to TypeScript. Here is why static typing is the best investment for long-term project health.

Need IT development for your business?

We build websites, mobile apps and AI solutions. Free consultation.

Web Development

Get Consultation All articles