Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
March 5, 2020 09:10 pm GMT

Why Svelte? (The Short Version)

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

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:

  • Computer, build me an app - 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 - 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 - 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:

Why I enjoy Svelte

This is a rehash of a blogpost I did

  • Batteries Included
  • The Joy of Mutability
  • $ugar $yntax
    • Two Way Binding
    • Stores
  • Good Docs
  • Simple Internals

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:


Original Link: https://dev.to/swyx/why-svelte-the-short-version-3g0n

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To