sveltethemes.dev

Why Svelte | Svelte Themes

3/10/2020Updated 3/26/2025

Excerpt

(1, 2, 3) Like most frameworks that abstract the DOM, Svelte has incompatibilities like the inability to name a prop `class` because it’s a reserved keyword in JS, and you’ll use `on:click` not `onclick`, but these quirks are few in number and reflect carefully chosen tradeoffs. … Concurrent mode applies additional restrictions that developers are learning to work with, which the React team confidently trades for the benefits. The tradeoffs are complex, context-dependent, and nuanced. React may provide amazing UX in some circumstances once concurrent mode is ready, but I’m skeptical that their solution is the best one for our problems. … Svelte’s upsides are compelling to our team, but we also need to understand its downsides. First we’ll discuss the negatives that are unlikely to change. The compiler architecture moves complexity from the runtime and source code to buildtime and tools. Behind Svelte’s simple APIs sits a beefy compiler. Frontend web development has become very tool heavy in the webapp era, so in practice this adds little cost beyond what developers like myself already pay, but increased build complexity is important to acknowledge. For example Vue’s Evan You has stated that Vue should always be droppable into any webpage for immediate development. Many people like and rely on this ability. It keeps things simple. Svelte can do this but only by including its compiler in the browser, which currently weighs 870k. This is super useful in some circumstances, like Svelte’s REPL, but it’s not a viable option for normal application code. Svelte requires a build step that’s heavier than React’s JSX and Vue’s `.vue` files. Svelte is its own language not plain HTML+CSS+JS, increasing the risks of adoption, … Svelte may never be able to implement the equivalent of React’s concurrent mode. This could be a big deal and it’s probably the weakest part of my recommendation to my team. See the discussion above for more about concurrent mode. Rich Harris intends to implement an equivalent to React’s suspense, so it appears React’s advantage there is temporary. Svelte has a history of surprising innovations but we shouldn’t count on this one. … Svelte’s userland resources and cultural knowledge like patterns, anti-patterns, best practices, and consensus libraries are sparse and under-developed. People who adopt it today will have to think through problems where other communities have common knowledge solutions, making the learning curve temporarily steeper. Svelte’s beginner documentation is great but people are still figuring out what mastery looks like. … Svelte is known for its tantalizingly small JavaScript bundles, and compiler improvements sometimes shrink the output even more for free, but there’s a problem here. With its current compiler, as more components are added to a single bundle, Svelte’s JS size advantage shrinks and eventually reverses, because Svelte templates are compiled to a form that is more verbose than the source.

Source URL

https://sveltethemes.dev/mbrukman/why-svelte

Related Pain Points

Limited third-party library ecosystem

7

Svelte has significantly fewer libraries than React, forcing developers to build custom solutions or use workarounds for common needs like advanced form handling, markdown rendering, and LLM integration. Third-party packages sometimes break when used with Svelte.

ecosystemSvelte

Svelte compiler adds significant build complexity

6

Svelte moves complexity from runtime to buildtime, requiring a heavy compiler toolchain. Unlike Vue which can be dropped into webpages directly, Svelte requires a build step heavier than React's JSX, and the browser-bundled compiler weighs 870k, making it unviable for normal application code.

buildSveltebuild tools

Svelte may lack concurrent mode equivalent indefinitely

5

Svelte may never be able to implement an equivalent of React's concurrent mode, which could be a significant limitation. While Rich Harris intends to implement Suspense equivalents, there's no guarantee Svelte can achieve React's concurrent capabilities.

performanceSvelteReact

Large bundle sizes with many small components due to per-component runtime

4

Each Svelte component generates its own runtime code. In applications with many small components, this results in larger bundle sizes compared to runtime-based frameworks. Reactivity system can cause unnecessary updates in complex scenarios.

performanceSvelte

Svelte language syntax creates additional adoption risks

4

Svelte is its own language and not plain HTML+CSS+JS, which increases the risks of adoption. Developers must learn Svelte-specific syntax rather than using standard web technologies.

compatibilitySvelte