Svelte 5 is out, and it's radically different but intimately familiar.
This talk has been presented at JSNation US 2024, check out the latest edition of this JavaScript Conference.
Svelte 5 is out, and it's radically different but intimately familiar.
This talk has been presented at JSNation US 2024, check out the latest edition of this JavaScript Conference.
Svelte developers believe the web is a critically important technology with unmatched openness and potential as an application delivery mechanism, which needs to be preserved and improved.
Svelte is HTML-first, focusing on states rather than changes between states like JavaScript does. It allows developers to use valid HTML directly in components, offering a more intuitive approach compared to React's JSX.
Svelte 5 introduces explicit state annotation with runes, compiler augmented reactivity, style encapsulation, and improved developer experience with features like native scoped styles and transitions.
SvelteKit is a companion project to Svelte, designed to solve broader application development problems such as setting up build tooling and defining routes, enhancing Svelte's capabilities.
Svelte aims to solve the problem of building resilient, accessible, and delightful software by focusing on ease of use, efficient performance, and a strong developer community.
The main goal of Svelte is to provide a better developer experience without compromising user experience, aiming to be the framework with the best vibes rather than focusing solely on performance metrics.
The North Star symbolizes the guiding principle or mission for Svelte and its developers, representing the goal of making better software and contributing positively to the web's future.
Rich Harris was inspired by his childhood obsession with space and the concept of finding direction and purpose in uncertain environments, which he applies to his work in open source software.
Svelte uses compiler augmented reactivity and runes to manage reactivity at the language level, allowing for fine-grained control and efficient state updates without an explicit framework API.
Svelte is a user interface framework that started as a side project eight years ago by Rich Harris. It began as a compiler that transforms components into self-contained JavaScript, aiming for efficiency and ease of use.
As a child, I was obsessed with space and my father taught me how to read the sky and find the North Star. I've been thinking about how this concept applies to other areas of our lives. My name's Rich Harris, and this is a talk about finding direction and purpose in open source.
As a child, I was obsessed with space. I loved coming to places like this. On cloudless nights, I would go into our back garden with my father, himself a bit of a space cadet, and he would teach me how to read the sky. He taught me the names of the stars and the constellations. He taught me that the things that seem most fixed are not fixed, but that through careful observation you can begin to predict their movements. And he taught me how to find the North Star.
On a clear night, if you can find the Big Dipper, then you can extend this line a little further to find Polaris, so named because a line drawn from the South Pole to the North Pole and extended into space would just about meet it. It is the fixed point about which the heavens turn and it always points due north. Ancient mariners used Polaris to cross the oceans. In the early United States, escaped slaves followed it to freedom. Today we don't tend to rely on celestial navigation, we have Google Maps. But I've been thinking a lot lately about this concept of being able to orient ourselves in an otherwise uncertain environment and how it applies to other areas of our lives. What does it mean to be pointing the right way?
My name's Rich Harris, you can find me at richharris.dev on Blue Sky, this is a talk about finding direction and purpose in open source. Like many of you, I write software for a living. More specifically, I work on a user interface called Svelte. I started working on Svelte eight years and three days ago. It started out as an innocent, fun side project that I had no idea would take over my life. The big idea was this. What if a framework, rather than being code that ran in the browser, was a compiler that transformed your component into self-contained JavaScript? We called it the magical disappearing framework and compared to React, it produced astonishingly efficient bundles. Because it moved work out of the browser and into your build process, we could make your apps really small and really fast.
Svelte three came out in 2019 and asked a different question. Can we use the compiler to make web development itself faster? Svelte by itself only solves a narrow slice of the problem of building a web application. In 2020, we started working on a companion project called SvelteKit. Last month, we released Svelte 5. Unlike React, Svelte is unapologetically HTML first. Svelte takes a different approach, it takes HTML as the starting point.
Svelte three came out in 2019 and asked a different question. Can we use the compiler to make web development itself faster? If we're not constrained by the rules of JavaScript, can we make components easier to write with less boilerplate? That was the point at which people really started paying attention to Svelte.
It turns out that while most developers care very deeply about performance and bundle size in theory, in practice we pick the tools we enjoy using. Some thought leaders will try to shame you for this. But I think it's pretty reasonable that if you're going to spend 40 hours a week working on something, it may as well be fun. And with compilers, better developer experience needn't come at the expense of user experience. And Svelte has a really good developer experience, at least according to surveys like the state of JavaScript. I don't know how long we can keep this streak up, but I'm excited to find out.
Svelte by itself only solves a narrow slice of the problem of building a web application. Namely, keeping the DOM in sync with your application state. And leaves everything else to you, like setting up your build tooling, organizing your code, defining your routes, generating optimal bundles and deploying to different environments and many, many other problems. In 2020, we started working on a companion project called SvelteKit, which was the first major framework to be built on top of Vite. It's designed to solve those problems for you.
All of which is to say that the project has had many identities over the course of its life. Last month, we released Svelte 5. On one level, it's very much a continuation. It's a backward-compatible release, which you can drop into an existing project with minimal disruption. But on another, it's the most radical change the project has undergone yet. So at this point, let me take a moment to introduce you or reintroduce you to the new Svelte.
Unlike React, Svelte is unapologetically HTML first. JavaScript is a decent general purpose language. But as a language for describing user interfaces, it's a bad match. When you write JavaScript, you're primarily concerned with the changes between states that result from user interaction. But when you're describing a UI, you're primarily concerned with the states themselves. Frameworks slap a declarative layer on top of JavaScript that lets you sort of pretend. But you often find yourself working against the grain of the language.
Svelte takes a different approach. It takes HTML as the starting point. If you have some valid HTML, whether you wrote it yourself or co-pilot wrote it for you or you found it on CodePen or StackOverflow or even in your browser DevTools, you can drop that into a Svelte component and it will work. The same is not true of JSX, which superficially resembles HTML, but changes it in a variety of subtle and annoying ways.
We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career
Comments