Back to all guides
Framework Comparison intermediate 8 min read

React 19 Hooks vs Svelte 5 Runes: Benchmark & Architecture

Comparing React 19 Virtual DOM rendering and useActionState against Svelte 5 signals compiler model.

Both React 19 and Svelte 5 bring major architectural shifts. While React doubles down on compiler memoization (React Compiler) and server-first components, Svelte 5 transitions to signal-based compiler primitives (Runes).


State and Form Handlers

Comparing form handling and reactive state between React 19 useActionState and Svelte 5 $state:

Form & Action State

Managing async submission state.

❌ React 19
React 19 Implementation
typescript
import { useActionState } from 'react';
async function updateName(prevState, formData) {
const name = formData.get("name");
return await saveToDb(name);
}
export function Profile() {
const [state, formAction, isPending] = useActionState(updateName, null);
return (
<form action={formAction}>
<input name="name" disabled={isPending} />
<button type="submit">Save</button>
</form>
);
}
✨ Svelte 5 (Runes)
Svelte 5 Runes
svelte
<script>
import { enhance } from '$app/forms';
let isPending = $state(false);
</script>
<form method="POST" use:enhance={() => {
isPending = true;
return async ({ update }) => {
await update();
isPending = false;
};
}}>
<input name="name" disabled={isPending} />
<button type="submit">Save</button>
</form>

Rendering Architecture Comparison

FeatureReact 19Svelte 5
Reactivity MechanismFiber Virtual DOM Tree DiffingSignals ($state) with DOM Node Mutation
Component ModelRe-executes whole function on renderExecutes setup once; updates DOM nodes directly
Bundle Impact~45 kB runtime engine~2-4 kB runtime engine
Re-render OptimizationRequires React Compiler / useMemoBuilt-in granular dependency tracking
Found an issue or want to improve this lesson? Edit this page on GitHub
S5
SuperSvelte
Svelte 5 + Hono RPC + Neon

The Batteries-Included Edge TS Framework

Stop assembling your stack from 15 npm packages. Super Svelte ships Auth, Neon DB, Redis SSE, OpenAPI 3.1 Hono RPC, Uploads, and Resend out-of-the-box with sub-10ms edge cold starts.

OpenAPI 3.1 Hono RPC
Better Auth & Multi-Tenancy
Neon DB + Drizzle ORM
Sub-10ms Edge Starts