Why Svelte? (The Short Version)
Tags: svelte
Published: 2020-03-05 21:10:59

---
title: Why Svelte? (The Short Version)
published: true
description: The short version of Why Svelte
tags: Svelte
slug: why-svelte-short
displayed_publish_date: "2020-03-04"
canonical_url: https://www.swyx.io/writing/why-svelte-short
---

I'm preparing an introductory talk on Why Svelte for the [March Svelte Society NYC meetup](https://www.downtomeet.com/Svelte-Society-NYC/Svelte-Society-NYC-5-the-IDE-s-of-March-2074654) so here are my talk notes.

[My slides are here.](https://docs.google.com/presentation/d/1TN7vjWh_7Q0S9P0CBUzLymA6mHaNr4ZA9qr6R1QcNTE/edit?usp=sharing)

[Ryan Atkn wrote a longer version here](https://github.com/feltcoop/why-svelte).

## Why is it called Svelte?

Attractively thin, graceful and stylish.

## What is Svelte?

Svelte is a compiler, not a library - it takes your Svelte input and turns it into server rendered HTML, static CSS, and clientside JS, and it can build to WebGL, iOS, Android, and Web Components.

In a library, the code that you write is the code that runs. You have to trade off features vs code size.

With a compiler, the code that you write can compile to all sorts of formats, so your solution space gets much larger, while also being able to turn code into efficient low level equivalents. You can include features like styles, [transitions](https://svelte.dev/examples#custom-css-transitions), and [FLIP animations](https://svelte.dev/tutorial/animate) without adding code size if it isn't used, or building in compile time accessibility and [unused CSS checking](https://css-tricks.com/what-i-like-about-writing-styles-with-svelte/).

## Svelte in Rich's words

In 2019 Rich did a series of 3 talks that explored different viewpoints of Svelte:

- [Computer, build me an app](https://www.youtube.com/watch?v=qqt6YxAZoOc) - Svelte as a compiler that takes your component code and turns it into vanilla JavaScript, that manipulates the DOM directly. This means bundles are smaller, which means for faster download and startup times.
- [Rethinking Reactivity](https://www.youtube.com/watch?v=AdNJ3fydeao) - React reruns too much, memoization and amortization APIs are abstraction leaks. Svelte 3 moves reactivity out of the component API (`this.set()`), and into the language (`=` and `$:`). Spreadsheets and Reactive Programming is approachable to more people, like Svelte is with the HTML approach.
- [The Return of Write Less, Do More](https://www.youtube.com/watch?v=BzX4aTRPzno) - Svelte lets you write less code with better tooling support because HTML is the language of the web. Writing less lets you do more. Taken to an extreme it may let a lot more people create software and save the planet.


## Benchmark Hijacks:

- https://twitter.com/Rich_Harris/status/838115880680710144
- https://twitter.com/Rich_Harris/status/1065992585095929857/photo/1
- https://twitter.com/rich_harris/status/1200805237948325888?lang=en
- https://twitter.com/jpriceio/status/965964676273188869

Basically, Svelte is fast enough. [I don't really care about who is fastest.](https://www.swyx.io/writing/good-enough)

## Why I enjoy Svelte 

This is a [rehash of a blogpost I did](https://www.swyx.io/writing/svelte-why/)

- Batteries Included
- The Joy of Mutability
- $ugar $yntax
  - Two Way Binding
  - Stores
- Good Docs
- Simple Internals
  - It is easy to contribute! [Here's how](https://www.swyx.io/writing/svelte-contributing/)

## It is still Early Days

Most of all, it is fun and small. Ever felt like you were too late on a framework or community? Now is your chance, there's very little baggage and a lot of blank space for you to color in:

- Projects
  - [Sapper](https://sapper.svelte.dev/)
  - [Svelte Native](https://svelte-native.technology/)
  - [SvelteGL](https://twitter.com/rich_harris/status/1127930615033102337)
  - [Svelte Routify](https://github.com/sveltech/routify)
  - [TypeScript Support](https://gist.github.com/orta/ce05553de3fa9ba847ab410f29f874a4)
  - [MDSvex](https://github.com/pngwn/MDsveX)
  - [SSG](https://github.com/sw-yx/ssg/blob/master/packages/ssg/README.md)
- Community 
  - [on Discord](https://svelte.dev/chat)
  - [13 Meetups worldwide](https://twitter.com/SvelteSociety/status/1235264100600631296)
- Jobs
  - https://twitter.com/sveltejobs
  - [on Discord](https://svelte.dev/chat)