swyxio / swyxdotio

This is the repo for swyx's blog - Blog content is created in github issues, then posted on swyx.io as blog pages! Comment/watch to follow along my blog within GitHub
https://swyx.io
MIT License
336 stars 45 forks source link

Why Svelte? (The Short Version) #378

Closed swyxio closed 2 years ago

swyxio commented 2 years ago

source: devto devToUrl: "https://dev.to/swyx/why-svelte-the-short-version-3g0n" devToReactions: 59 devToReadingTime: 3 devToPublishedAt: "2020-03-05T21:10:59.619Z" devToViewsCount: 1361 title: Why Svelte? (The Short Version) published: true description: The short version of Why Svelte category: essay tags: Tech, Svelte, JavaScript slug: why-svelte-short date: 2020-03-04

I'm preparing an introductory talk on Why Svelte for the March Svelte Society NYC meetup so here are my talk notes.

My slides are here.

Ryan Atkn wrote a longer version here.

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, and FLIP animations without adding code size if it isn't used, or building in compile time accessibility and unused CSS checking.

Svelte in Rich's words

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

Benchmark Hijacks:

Basically, Svelte is fast enough. I don't really care about who is fastest.

Why I enjoy Svelte

This is a rehash of a blogpost I did

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: