Less noise, more data. Get the biggest data report on software developer careers in South Africa.

Dev Report mobile

Rich Harris: The story of Svelte

19 April 2023 , by Chris Booth

We’re creating documentaries to tell the tech stories that inspire people to keep creating and learning, and ultimately, unlock more potential in both themselves and software. Check out the YouTube Channel!

Here Rich Harris talks about his journey in creating Svelte - from its inspiration to the evolution of its versions, and how it became a successful project with a large community of contributors.

The Transcript

When I started doing visual journalism, the tooling available to programmers wasn't as good as it is today. There just wasn't as much stuff and it was hard. It was really hard to write these rich interactive applications. And so with, you know, all of the naivety of youth, I thought I can solve this. And so, I started working on a framework of my own called Ractive, which was kind of inspired by a mash-up of Knockout and Angular and some of the other things that were around at the time.

And it was pretty good, like I was very fond of it. But ultimately, it just wasn't good enough to compete with some of the bigger frameworks. And so, after a few years, I became of the view that Ractive, like many of the frameworks from that era, weren't really well suited to the era of the mobile web. And the reality was that we were shipping too much JavaScript and we were doing too much work and we needed to kind of reset our expectations around what frameworks look like.


So in a way, Svelte began as an act of atonement for my sins and you can kind of trace its origin back to BrooklynJS, which was a monthly meetup that used to happen in Brooklyn just around the corner from here. And this was a place where JavaScript programmers in the area would come together, and they would share lightning talks and talk about things they're working on. And at one of those evenings, I was talking to Jed Schmidt, one of the people who ran BrooklynJS, and he was talking about an idea that he had that would turn the code that you'd written into something else - he was talking about compilers.

And I didn't really understand what all that meant at the time, but the idea kind of lodged itself in my brain. And so these two things came together, my own sense of responsibility for having built a framework that had too much JavaScript and did too much work. And this idea that you could use compilers to do a better job of delivering a really good user experience, and that came together in around Thanksgiving 2016, the idea for Svelte happened, and I spent a few days coding furiously, and by the end of it, I'd been able to create a TodoMVC which is like one of the standard sort of benchmarks for frameworks, that weighed about three and a half kilobytes, which compared to literally every other framework at the time, was minuscule.

And so at that point, you know, I tweeted out that this was the result that we managed to get with Svelte. And that's when a certain segment of the JavaScript population started getting really interested in what we were building and I wrote a blog post explaining this whole concept of a framework-less framework and that's when we started getting interest and other people showed up and started contributing. And we've had a community of Svelte developers ever since then.

One of the earliest contributors was Conduitry who came on board back when it was still Svelte 1 and has kept the project afloat at a number of critical times, like it wouldn't be here today without him. In 2019, Li Hau joined and in 2020 Ben joined, and again, I don't know where we'd be without those contributions. And so those three are all members of a core team that includes about 12 people or so. But the contributor base is actually pretty huge if you count everyone who's committed code to just the main Svelte repo. We're talking about upwards of 450 people.

Svelte version 1 was basically Ractive, but with a compiler. It inherited a lot of the same design that Ractive had, and the reason for that was because we wanted to use it at The Guardian and we were using Ractive at the time, and it made sense to have something that was very familiar to people. And also Ractive had an existing community, and I was hoping that some of the people who were using Ractive would come on board and use Svelte. By the time Svelte 2 to came out, we'd realised that some of the design decisions that were taken with Ractive were the wrong ones and that people's expectations had changed a little bit.

And so Svelte 2 was really just a slight refinement. For example, instead of having double curly braces in the template syntax, we would have single curly braces, so that is more like JSX, and we made a few other cosmetic changes like that. But other than that, it was pretty much the same as Svelte 1.

Svelte 3 was when we kind of tore up the rulebook and we started thinking, you know, we have a compiler, we can essentially create our own language. What would it look like if we were to create the most elegant and usable way of describing user interfaces? And whether we achieved that or not, I don't know, but I think we got pretty close.

Svelte 3 was when everything changed. I don't think any of us ever really expected Svelte to become quite as big as it has. If you'd asked me a couple of years ago if I would want to work on Svelte full-time, I would have definitely said no. I enjoyed my job at The New York Times way too much. And, you know, I worried that if I was working on the framework instead of building things with the framework, that I would kind of lose touch with with, you know, what the needs were on the ground, so to speak.

But, you know, Svelte has reached a point now where enough people are using it and there are enough demands on our development time that not having someone working on it full time I think is at this point totally unsustainable. And the arrangement with Vercel, I think, is the best thing that could have happened for Svelte. I know that there are some people that are like, well, hang on, what's in it for Vercel? But I think our interests are actually really well aligned. Like, Vercel and Svelte are both ultimately about making it easier for more people to build stuff on the web, and for that stuff, to be fast by default.

And so it makes a lot of sense to me. I don't know what the future of Svelte looks like, we have a very long roadmap, a long wish list of things that we want to do with Svelte, but for us, like our kind of North Star, is getting rid of the barriers to entry, we want as many people as possible to be able to build stuff on the web. We've never been primarily focused on adoption. Adoption is a good metric, if the numbers are going up, it means the people are talking about the thing and other people are listening. But, you know, we would rather have a thing that a small number of people love than a thing that a large number of people tolerate.

Will I still want to work on it ten years from now? I'm hoping that if Svelte is still around and I hope it is still around the we will have found a way to make it a self-sustaining project that isn't reliant on any one individual but is, you know, a thing unto itself.

Recent posts

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.