*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, Scott Tolinski, Amelia Wattenberger and Swyx explain how Svelte differs from React and Vue.js.*
It tries to do as much of the work in the build time instead of in the runtime. What that means is that whereas, for example, React will do some work to compute the difference between what’s currently on the page and what should be on the page.
It’s actually is pretty similar to React when you look at the compiled output as Svelte has components, it has a lot of local state methods, it has a small little scheduler, but it does not have a virtual DOM and React does. Virtual DOM has been kind of sold as a way for React to be faster or more correct for a long time
and I think it took awhile to offer a different alternative. That really woke me up to the idea that I don’t actually need these people. I only think I need this because people told me I need this and I think there was a talk that actually Rich gave here in New York City.
And he said you people are kind of drinking the Kool-Aid and you don’t actually need all this machinery in order to do components. Right. And then he showed how he did it in Svelte and the difference is night and day, like the the Baseline React app is like 120 kilobytes, a basic small app that says Hello World will take less than three kilobytes like much less than that probably I haven’t even measured because it basically compiles down to what you would write by hand.
And the reason that other libraries integrate so nicely with Svelte is because Svelte is a superset of HTML. And that’s something I think is a strong design choice that just led to a lot of good decisions down the line.
But you have these superpowers now of, you know, you can have a for a loop within each HTML or you can show something whether or not a certain variable is true. And I think it doesn’t force you to learn a lot of framework-specific concepts. Instead, it’ll introduce concepts that even if you’re going on to a React job, you’re going to need to learn in the first place.
And I think it’s just like a really nice steppingstone to a job or just you know, the the way that you might build apps from now on.
So I don’t think it’s going anywhere. One of the best things about Svelte being as dynamic and as interesting as it is, is that when people try it, they stick with it. And they give it high approval ratings and they feel very good about their time using it. So I think we’re just going to see more and more people try it, like it and stay with it.
Not to say that it’s going to take over or become the next thing or something like that. But I strongly feel like it’s not going anywhere. The code experience, the developer experience, everything is just too good.
So it’s a self-selecting group of people who are answering those surveys when folks get bigger. If it does continue to become bigger, the more of those developers will be people who found themselves working on a svelte codebase, but not through choice. And at that point, you know, those numbers, they’re going to drop off. And so our challenge is to try and keep people as enthusiastic about as they are now while the framework continues to grow.
How do you want to do this? So if there’s a chart of satisfaction and usage usually starts low, but there’s a lot of satisfaction and as it grows in usage because people are so satisfied usually there’s like this curve where it once everybody starts to use it, they feel obligated to use it and then they all start using it and then they’re like, Oh no, I was forced to use this.
And it doesn’t matter to me that it is less popular than React. You know, obviously what I’m doing here is I’m trying to make it more popular, but I don’t want it to win. Some like the most popular framework in the world doesn’t matter. I’m it matters to me that I’m more productive in Svelte than I am in React.
And I can attest to that for a fact.
- Laravel Origins: The Documentary by OfferZen
- Why OfferZen is Making Documentaries about Open-source tech
- Taylor Otwell Tells the Story behind Laravel Forge
- Taylor Otwell on how he Decides what PRs to Merge into Laravel
- Jeffrey Way Tells the Story of Laracasts
- The Story of Tailwind CSS feat. Adam Wathan
- Nuno Maduro Tells the Story of Pest PHP
- Larabelles and Inclusivity in the Laravel community
- PHP Isn’t Dead ft. Jeffrey Way, Erika Heidi and others
- Taylor Otwell Explains his Coding Style
- The story of Laravel News featuring Eric L. Barnes
- Taylor Otwell on the Importance of Documentation and Developer Experience in Laravel
- The story of Code Happy, Code Bright & Code Smart feat. Dayle Rees
- Taylor Otwell on How He Got Into Programming
- The pros and cons of open-source feat. the Laravel Origins cast
- Taylor Otwell on how Laracon came to be
- Rich Harris on why he created Svelte