Skip to content

Fine-grained client reactivity

Fine-grained reactivity limits how much work a state change causes, so only the parts of the UI that read the changed value update. Solid, Svelte, and Marko go furthest and write straight to the affected DOM nodes; Vue and Angular update at component granularity (Vue diffs a compiler-optimised virtual DOM); Qwik falls back to a vDOM for structural changes. React gets there with the first-party React Compiler, which memoizes components, values, and JSX at build time so a state change skips the parts of the tree whose inputs did not change. This is an interaction-cost property, not a first-paint one: in principle it shows up in INP and memory on long-lived pages.

10 / 14Other featureOne of 7 features that do not affect first paint. Together they are worth 14 of the 28 points.

Labels across 23 frameworks

  • 1st-party22
  • Experimental0
  • Third-party0
  • Manual1
  • of 23

How to enable it, by framework

One card per framework, in the same order on every feature page. Where a framework has no built-in support (Manual), a short example shows how to build it yourself.

Next

1st-party2 ptsOverview

The first-party React Compiler, switched on with reactCompiler: true (stable since v16.0.0; enabled in this port). Next runs it through the Babel plugin, applied only to files with JSX or hooks; Next 16.4 also has an experimental native Rust build of the compiler, experimental.turbopackRustReactCompiler: true, used alongside reactCompiler: true.

const nextConfig: NextConfig = {
  reactCompiler: true,
};

From this repo's next-books/next.config.ts (other options omitted).

Nuxt

1st-party2 ptsOverview

Vue's ref/reactive tracks dependencies and updates the affected effects. Nothing to enable.

const value = ref('');

From this repo's nuxt-books/app/components/BookSearch.vue (optimized branch).

SvelteKit

1st-party2 ptsOverview

Runes ($state, $derived, $effect). Dependencies are picked up at runtime from whatever a $derived or $effect reads, not by compile-time analysis, and $state proxies trigger granular updates. Nothing to enable.

let isOpen = $state(false);

From this repo's svelte-books/src/lib/features/book/components/MobileBookSidebar.svelte (optimized branch).

SolidStart

1st-party2 ptsOverview

Signals; updates write to the DOM directly without re-running components.

const [isOpen, setIsOpen] = createSignal(false);

From this repo's solid-books/src/components/mobile-book-sidebar.tsx (optimized branch).

React; the first-party React Compiler is added as a Babel preset to the React Vite plugin. It is not enabled in this port (vite.config.ts calls viteReact() with no compiler preset).

Code example

Add the React Compiler preset through @rolldown/plugin-babel next to viteReact(). The compiler memoizes components and hooks at build time, so fewer components re-render when state changes.

// vite.config.ts
import { defineConfig } from 'vite'
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import viteReact, { reactCompilerPreset } from '@vitejs/plugin-react'
import babel from '@rolldown/plugin-babel'

export default defineConfig({
  plugins: [
    tanstackStart(),
    viteReact(),
    babel({ presets: [reactCompilerPreset()] }),
  ],
})

Source: React: React Compiler installation

Signals; updates write to the DOM directly (the same createSignal shown for SolidStart).

Code example

createSignal returns a getter and a setter. Reading quantity() in JSX subscribes that text node, so a click updates only that node. The component function does not run again.

import { createSignal } from 'solid-js'

export function LineItem() {
  const [quantity, setQuantity] = createSignal(1)
  const price = 12

  return (
    <div>
      <button type="button" onClick={() => setQuantity(quantity() - 1)}>−</button>
      <span>{quantity()}</span>
      <button type="button" onClick={() => setQuantity(quantity() + 1)}>+</button>
      <p>Subtotal: ${quantity() * price}</p>
    </div>
  )
}

Source: Solid: Reactivity

Pracht

1st-party2 ptsOverview

Preact; signals are an opt-in @preact/signals package from the Preact team, counted as first-party the way Vue's reactivity is for Nuxt; Pracht's own docs do not mention it. This port does not use them, and no code example was found in the docs.

Code example

Install @preact/signals. Passing the signal itself into JSX ({count}, not {count.value}) binds it straight to the text node, so the component does not re-render when it changes.

// src/components/counter.tsx
import { signal } from '@preact/signals'

const count = signal(0)

export function Counter() {
  return (
    <div>
      <p>Count: {count}</p>
      <button onClick={() => count.value++}>click me</button>
    </div>
  )
}

Source: Preact: Signals

Waku

1st-party2 ptsOverview

React; the first-party React Compiler is enabled via a Babel preset (on both main and optimized in this port).

plugins: [tailwindcss(), react(), babel({ presets: [reactCompilerPreset()] })],

From this repo's waku-books/waku.config.ts (optimized branch).

Ember

1st-party2 ptsOverview

@tracked autotracking.

export default class SidebarService extends Service {
  @tracked isOpen = false;
}

From this repo's ember-books/app/services/sidebar.js (optimized branch; methods omitted).

Astro

1st-party2 ptsOverview

No reactivity of its own in .astro components; the official Astro-team integrations @astrojs/solid-js, @astrojs/svelte, and @astrojs/vue (installed with astro add) bring Solid signals, Svelte runes, and Vue refs to islands. (framework-components, solid-js, svelte, vue)

Code example

.astro components have no client state. Add a UI framework integration (here Solid via astro add solid) and use its signals inside an island.

// src/components/Counter.tsx
import { createSignal } from 'solid-js';

export default function Counter() {
  const [count, setCount] = createSignal(0);
  return <button onClick={() => setCount(count() + 1)}>Clicked {count()}</button>;
}
---
// src/pages/index.astro
import Counter from '../components/Counter';
---
<Counter client:load />

Source: Astro: @astrojs/solid-js

React Router

1st-party2 ptsOverview

React-based; the first-party React Compiler is added as a Babel preset to the React Vite plugin (not enabled in this port). v8.4.0 also split internal router contexts to reduce router re-renders. (react-compiler, changelog)

Code example

Add the React Compiler's Babel plugin next to reactRouter(). The compiler memoizes components and hooks at build time, so fewer components re-render when state changes.

// vite.config.ts
import { defineConfig } from 'vite'
import babel from 'vite-plugin-babel'
import { reactRouter } from '@react-router/dev/vite'

export default defineConfig({
  plugins: [
    reactRouter(),
    babel({
      filter: /\.[jt]sx?$/,
      babelConfig: {
        presets: ['@babel/preset-typescript'],
        plugins: [['babel-plugin-react-compiler', {}]],
      },
    }),
  ],
})

Source: React: React Compiler installation

Qwik City

1st-party2 ptsOverview

Signals/stores re-run dependent components; the FAQ says Qwik uses the vDOM "only sometimes" and otherwise updates the DOM directly (non-structural changes). The scope is not detailed. (faq, state)

Code example

useSignal and useStore are tracked. Changing a value updates the parts of the DOM that read it.

// src/components/counter/counter.tsx
import { component$, useSignal, useStore } from '@builder.io/qwik'

export const Counter = component$(() => {
  const count = useSignal(0)
  const state = useStore({ name: 'Qwik' })
  return (
    <>
      <button onClick$={() => count.value++}>Increment {count.value}</button>
      <input value={state.name} onInput$={(_, el) => (state.name = el.value)} />
    </>
  )
})

Source: Qwik: State

Angular (SSR)

1st-party2 ptsOverview

Signals (signal, computed, linkedSignal, effect, resource) track dependencies dynamically; zoneless is default from v21. The page gives no stability label. (signals, zoneless)

Code example

From the Books port's cover component: input() and signal() hold state, computed() derives from them, and the template re-renders only what reads a changed signal.

// src/app/book/book-cover.ts
import { ChangeDetectionStrategy, Component, computed, input, signal } from '@angular/core';

@Component({
  selector: 'app-book-cover',
  changeDetection: ChangeDetectionStrategy.OnPush,
  template: `
    @if (showImage()) {
      <img [src]="readySrc()" [alt]="title()" (error)="failedSrc.set(readySrc())" />
    } @else {
      <div role="img">Cover unavailable</div>
    }
  `,
})
export class BookCover {
  readonly title = input.required<string>();
  readonly src = input.required<string | null>();
  protected readonly failedSrc = signal<string | null>(null);
  protected readonly readySrc = computed(() => getLargeBookImageUrl(this.src() ?? EMPTY_IMAGE_URL));
  protected readonly showImage = computed(() => this.readySrc() !== this.failedSrc());
}

Source: Angular: Signals

Marko

1st-party2 ptsOverview

The compiler resolves reactivity per expression; "no dependency tracking happens at runtime"; <let> / <const>. (why-is-marko-fast)

Code example

<let> declares state and <const> derives from it. The compiler works out which DOM nodes depend on count at build time, so there is no runtime dependency tracking.

// src/tags/counter.marko
<let/count=0>
<const/doubled=count * 2>

<button onClick() { count++ }>
  ${count} × 2 = ${doubled}
</button>

Source: Marko: Why is Marko fast

Fresh

1st-party2 ptsOverview

Preact signals (useSignal from @preact/signals, a dependency of @fresh/core and part of the @fresh/init scaffold). Fresh serializes signal props so islands share state. (signals, sharing-state-between-islands)

Code example

Preact signals. In the Books port, one module-level signal is shared by two islands: the trigger sets it and the drawer re-renders when it changes.

// lib/catalog-nav.ts
import { signal } from '@preact/signals';
export const mobileSidebarOpen = signal(false);
// islands/MobileSidebarTrigger.tsx
import { mobileSidebarOpen } from '@/lib/catalog-nav.ts';

export default function MobileSidebarTrigger() {
  return <button aria-label="Open filters" onClick={() => (mobileSidebarOpen.value = true)}>Filters</button>;
}

// islands/MobileSidebar.tsx
export default function MobileSidebar({ children }: { children?: ComponentChildren }) {
  const isOpen = mobileSidebarOpen.value;
  return <aside hidden={!isOpen}>{children}</aside>;
}

Source: Fresh: Signals

Analog

1st-party2 ptsOverview

Angular signals (signal, computed, resource); Analog's own injectServerFn returns an Angular resource that refetches when a signal it reads changes. Zoneless change detection is the default from Angular 21. (server-functions, signals)

Code example

A signal holds the search text. injectServerFn returns an Angular resource that refetches when a signal read in its args factory changes.

// src/app/pages/search.page.ts
import { Component, computed, signal } from '@angular/core';
import { injectServerFn } from '@analogjs/router';
import { searchBooks } from '../server-fns/books.server';

@Component({
  template: `
    <input [value]="query()" (input)="query.set($any($event.target).value)" />
    <p>{{ count() }} results</p>
    @for (book of books.value() ?? []; track book.id) {
      <p>{{ book.title }}</p>
    }
  `,
})
export default class SearchPage {
  query = signal('');
  protected books = injectServerFn(searchBooks, () => ({ q: this.query() }));
  count = computed(() => this.books.value()?.length ?? 0);
}

Source: Analog: Server functions, Angular: Signals

Vike

1st-party2 ptsOverview

The Vike-team UI extensions bring the UI framework's own reactivity: Solid signals with vike-solid, Vue refs with vike-vue, and the first-party React Compiler for vike-react, added to the React Vite plugin. (vike-solid, vike-vue, vike-react)

Code example

With vike-react, add the React Compiler to the Vite config. It memoizes components and values at build time, so a state change re-renders less.

// vite.config.ts
import { defineConfig } from 'vite'
import vike from 'vike/plugin'
import react, { reactCompilerPreset } from '@vitejs/plugin-react'
import babel from '@rolldown/plugin-babel'

export default defineConfig({
  plugins: [
    vike(),
    react(),
    babel({ presets: [reactCompilerPreset()] }),
  ],
})

Source: React: React Compiler installation · Vike: vike-react

RedwoodSDK

1st-party2 ptsOverview

React-based; the RedwoodSDK guide adds the first-party React Compiler as a Babel plugin on @vitejs/plugin-react, placed before the Cloudflare and RedwoodSDK plugins. (react-compiler)

Code example

Add the React Compiler as a Babel plugin on @vitejs/plugin-react, placed before the Cloudflare and RedwoodSDK plugins. Components then get automatic memoization without useMemo or useCallback.

// vite.config.mts
import { defineConfig } from "vite";
import { redwood } from "rwsdk/vite";
import { cloudflare } from "@cloudflare/vite-plugin";
import react from "@vitejs/plugin-react";

export default defineConfig({
  plugins: [
    react({
      babel: {
        plugins: ["babel-plugin-react-compiler"],
      },
    }),
    cloudflare({ viteEnvironment: { name: "worker" } }),
    redwood(),
  ],
});

Source: RedwoodSDK: React Compiler

Remix 3

Manual0 ptsOverview

State is a plain variable and the component re-renders only when the app calls handle.update(); there are no signals and no dependency tracking. (interactivity, component)

Code example

State is a plain variable in setup scope. The component renders again only when you call handle.update().

// app/ui/public/counter.tsx
import { on } from "remix/component";
import type { Handle } from "remix/component";

export function Counter(handle: Handle<{ initialCount: number }>) {
  let count = handle.props.initialCount;

  return () => (
    <button
      type="button"
      mix={on("click", () => {
        count++;
        handle.update();
      })}
    >
      Count: {count}
    </button>
  );
}

Source: Remix: Interactivity, state, updates, and post-render tasks

Void (React)

1st-party2 ptsOverview

React-based; the first-party React Compiler is added to @vitejs/plugin-react through voidReact({ react: { ... } }). The Void docs do not mention the compiler. (pages adapters, react-compiler)

Code example

React re-renders the component that owns the state. Void passes react options to @vitejs/plugin-react, so you can add the React Compiler to skip unchanged children. The Void docs do not mention the compiler.

// vite.config.ts
import { voidReact } from '@void/react/plugin'
import { defineConfig } from 'vite'
import { voidPlugin } from 'void'

export default defineConfig({
  plugins: [
    voidPlugin(),
    voidReact({ react: { babel: { plugins: ['babel-plugin-react-compiler'] } } }),
  ],
})

Source: Void: Pages API · React Compiler

Void (Vue)

1st-party2 ptsOverview

Vue refs and computed track dependencies; a change re-renders only the components that read it. (pages adapters, vue reactivity)

Code example

@void/vue keeps Vue's reactivity: a ref change re-renders only the components that read it.

<!-- pages/counter.vue -->
<script setup lang="ts">
import { ref } from 'vue'
const count = ref(0)
</script>

<template>
  <button @click="count++">Count: {{ count }}</button>
</template>

Source: Void: Pages API · Vue: Reactivity fundamentals

Void (Svelte)

1st-party2 ptsOverview

Svelte 5 runes ($state, $derived) update the bound DOM nodes; the component script runs once. (pages adapters, $state)

Code example

@void/svelte keeps Svelte 5 runes: $state updates only the DOM nodes that read it, and the component script runs once.

<!-- pages/counter.svelte -->
<script lang="ts">
  let count = $state(0)
</script>

<button onclick={() => count++}>Count: {count}</button>

Source: Void: Pages API · Svelte: $state

Void (Solid)

1st-party2 ptsOverview

Solid signals (createSignal) update the bound DOM nodes; the component function runs once. @void/solid requires solid-js ^1.9 (Solid 1, not Solid 2). (pages adapters, signals)

Code example

@void/solid keeps Solid's signals: a createSignal change updates only the bound text, and the component function runs once. The adapter needs solid-js ^1.9 (Solid 1).

// pages/counter.tsx
import { createSignal } from 'solid-js'

export default function Counter() {
  const [count, setCount] = createSignal(0)
  return <button onClick={() => setCount(count() + 1)}>Count: {count()}</button>
}

Source: Void: Pages API · Solid: Signals

Gotchas

  • The React Compiler is opt-in for every React framework here: nothing changes until you add it to the build.
  • This row says nothing about first paint; do not read it as a loading-speed feature.