React vs Svelte Conceptual Overview
Two answers to one question
Every UI framework answers the same question: when state changes, how do we ensure that the view catches up promptly and consistently? React re-runs your component in the browser to build a virtual DOM, a lightweight description of the view held in memory, and compares it with the previous one to find what changed in the real DOM. In contrast, Svelte does its work before your app ships. It compiles each component at build time into JavaScript that updates the DOM directly. Each piece of state already knows which parts of the view read it, so a change goes straight to those parts, with no virtual DOM to build or compare.
The two also differ in their scope and ambition. React’s core is more limited and leaves routing, styling, and most shared state to libraries you choose. Svelte – together with the SvelteKit web framework – builds much more in by default. The same abstraction for state updates in one component also works for sharing state across components without the need for an external library.
The lessons that follow come back to these two differences: React’s re-render and compare versus Svelte’s compile and notify; React plus assembling your own stack versus Svelte & SvelteKit with batteries included.
React: re-render, then compare
At build time, JSX becomes ordinary function calls. React Compiler, if enabled, adds memoization.
setCount(count + 1)schedules a render.- React calls
Counter()again, and by default every child it renders. - React compares the new virtual DOM with the previous one.
- React commits only the DOM nodes that differ.
State is a snapshot: until that render, count keeps its old value, and objects and arrays are replaced rather than changed in place.
The work happens in the browser, and React’s scheduler can pause it. That is how React keeps typing responsive during a slow render, and how Suspense waits for data before showing a part of the tree.
Svelte: compile, then notify
At build time, the compiler turns each .svelte file into code that creates the DOM and subscribes each reactive read to its state.
countwas declared with$state, socount = count + 1writes to a signal, a value that tracks which code reads it.- The signal notifies only the code that read
count. - Svelte updates that one text node or attribute.
State is live: count holds the new value as soon as you assign it, and objects and arrays can be changed in place.
The component’s <script> runs once per instance. Nothing re-runs the component, and there is no virtual DOM to compare.
React’s docs call the two phases render and commit. What Runs on Each Render lets you click a button and count which code runs again in each framework.
Where they agree
The two frameworks share more ideas than they differ on. Most skills carry over, and most lessons translate a pattern rather than replace it.
Components in a tree
A UI is a tree of components. Props flow down, and children report back through callbacks. React spells out a form field as a value plus
onChange, and Svelte also offers two-way binding withbind:valuewhen you ask for it.Declarative markup
You describe the UI for the current state and the framework updates the DOM. Both use keys to track list items, and both need you to touch the DOM directly only for focus, measurement, and third-party widgets.
Effects as an escape hatch
useEffectand$effectboth exist to synchronize with systems outside the framework, and both sets of docs warn against using them to compute values.Composition and context
Children and snippets pass markup into a component. Context gives distant descendants a value without passing props through every layer.
The same toolchain
TypeScript, Vite, npm packages, and plain browser APIs work the same way in both. A library that doesn’t touch the UI works in either.
Full-stack frameworks
Next.js and React Router correspond to SvelteKit. Each has nested routes and layouts, server rendering, streaming, and forms that submit without JavaScript.
Performance Comparison
Svelte’s compiler-based approach can be much faster: over 10× faster than React’s streaming renderer at rendering HTML on the server, and nearly 7× faster at reordering rows in a list. Svelte’s biggest gains over React come in the work React adds on top of the DOM: rendering HTML on the server, comparing output after a change, and loading its runtime.
- 4.8–10.4×faster server rendering of the same HTML
- 6.8×faster at swapping two rows in a list
- 5.3×smaller JavaScript download
- 3.7×faster first paint
| Measurement | React | Svelte | React ÷ Svelte |
|---|---|---|---|
| On the server Measured for this guide · React 19.3.1, Svelte 5.59.2 | |||
| Render 1,000 rows to HTMLReact renderToString(), Svelte render() | 0.466 ms | 0.097 ms | 4.8× |
| The same, with React’s streaming rendererReact renderToReadableStream(), Svelte render() | 1.012 ms | 0.097 ms | 10.4× |
| In the browser js-framework-benchmark, Chrome 158 · React 19.2, Svelte 5.42 | |||
| Create 1,000 rows | 24.6 ms | 21.7 ms | 1.1× |
| Update every 10th row | 14.1 ms | 10.6 ms | 1.3× |
| Select a row | 5.5 ms | 4.8 ms | 1.1× |
| Swap two rows | 87.4 ms | 12.8 ms | 6.8× |
| Clear 1,000 rows | 16.4 ms | 10.3 ms | 1.6× |
| Create 10,000 rows | 341.6 ms | 223.3 ms | 1.5× |
| Overall slowdown1.00 is the fastest entry | 1.55× | 1.18× | 1.3× |
| Memory after page load | 1.18 MB | 0.67 MB | 1.8× |
| Memory after adding 1,000 rows | 4.39 MB | 2.86 MB | 1.5× |
| Compressed JavaScript | 51.4 kB | 9.7 kB | 5.3× |
| First paint | 228.9 ms | 61.8 ms | 3.7× |
Reading the results
- On the server, Svelte compiles a separate version of each component that joins strings together, while React builds an element tree and walks it on every request. React’s streaming renderer, which frameworks such as Next.js use so that Suspense can send HTML in pieces, takes 2.2× as long as
renderToString(). These times cover the renderer alone, not routing or data loading. - Creating rows is close, because building DOM nodes costs the same in any framework. The gap widens on updates, where React re-runs components and compares their output.
- Swapping two rows is nearly 7× slower in React. When an item moves, React’s list comparison moves the DOM nodes of every row between the two swapped rows, not just the two that changed.
- React uses almost double the memory before the page does anything, and its page takes 3.7× as long to paint, mostly because it loads and runs 5.3× as much JavaScript.
Why Svelte
Less code for the same result
State declared with $state reads and writes like a plain variable, so count = count + 1 and todos.push(item) update the view. A $derived value reads its inputs rather than listing them in a dependency array. Across the 29 lessons in this guide, the Svelte examples have 517 non-blank lines and the React examples have 693. That is 25% fewer lines and 13% fewer tokens, and Svelte is shorter in 27 of the 29 lessons. Most of the savings come from boilerplate such as setter calls, imports, closing JSX, and separate CSS files.
Batteries included, with fewer abstractions
Scoped styles, transitions, and two-way bindings are part of the language, and svelte/reactivity adds reactive versions of Map, Set, Date, and URL. State also works the same way at every scale. Where React shares state by lifting it into a parent, providing it through Context, or adding a store library like MobX or Jotai, the $state that drives one component can move into a .svelte.ts module that any component imports, as Shared State & Reuse shows. For whole apps, React’s docs recommend frameworks from other companies, such as Next.js from Vercel or React Router from Shopify. Svelte’s docs recommend SvelteKit, built by the Svelte team, which adds routing, data loading, form actions, server rendering, and adapters for deploying to different hosts. That leaves fewer libraries to choose between and fewer abstractions to learn, and the pieces are designed to work together.
The compiler keeps track of updates
The compiler sees which values the markup reads, so there is nothing to memoize, no stale closure to debug, and no rule about the order of Hook calls. React Compiler removes most hand-written useMemo, useCallback, and memo, but it does this by skipping parts of a re-render. Svelte has no re-render to skip. Compiler & Memoization compares the two compilers on the same component.
Smaller, faster output
Because the compiler moves work from the browser into the build, Svelte ships less JavaScript and does less of it on each update. In the measurements above, React ships 5.3× as much JavaScript, takes 3.7× as long to paint, and takes 4.8–10.4× as long to render the same HTML on the server.
Markup that reads like HTML
Attributes keep their HTML names, such as class and for. Events are plain onclick attributes, and logic lives in blocks such as {#if} and {#each}. You can usually paste HTML into a component unchanged.
Why React
A much larger ecosystem
In the week of November 22 to 28, 2026, npm served react about 253 million times and svelte about 9.8 million times, a 26× difference. Those counts include automated installs, but the gap shows up everywhere else too. React has more component libraries, design systems, SDKs that ship React components first, answers to search for, and developers to hire.
Mature async and server features
React can pause a slow render to keep typing responsive with transitions and useDeferredValue, wait for data with Suspense, and split one component tree between server and client with Server Components. Svelte 5 can’t pause a render, so the Svelte example in Responsive Input & Deferred Updates debounces instead, and Svelte has no component-level split between server and client. Its newer async features are still experimental as of Svelte 5.59 and SvelteKit 3.4: using await inside a component needs Svelte’s experimental.async flag, and SvelteKit’s remote functions need experimental.remoteFunctions as well. Without those flags, SvelteKit load functions fetch the data and {#await} blocks show pending promises.
Backing
Since February 2026, React and React Native have belonged to the React Foundation, hosted by the Linux Foundation, whose founding members include Meta, Microsoft, Amazon, and Vercel. Svelte is an independent open-source project with a smaller core team. Its creator, Rich Harris, has worked on it full-time at Vercel since late 2021.
Start with Component Basics if either framework is new to you, or use search to jump to a pattern you need.