Hacker News new | past | comments | ask | show | jobs | submit login
Svelte come on top for satisfaction and interest:3 (stateofjs.com)
55 points by kokizzu2 3 days ago | hide | past | favorite | 45 comments





Looking at the webpage, the high ranking of Svelte seems to be a bit misleading. It seems the percentage is based off (#interested + #number using)/total response.

When evaluating the actual numbers:

-Svelte has the most people not interested, but the least with people saying "will not use"

-React and Vue.js has almost 5x and 3x as many people saying they would use it again

-Svelte's high ranking comes from people who are interested but haven't used it at 10k people, providing it a high positive score, but less materiel interest.

-Svelte is still very unknown compared to React and Vue

Only time will tell where Svelte will end up on the js framework ladder, but the high ranking of Svelte seems to be attributed to interest and not actual use.

2020 numbers from the article:

-React: Would not use 2154; Not interested 1794; Would use again 15071; Interested 2490; Never heard 19

-Vue.js: Would not use 1574; Not interested 4070; Would use again 9029; Interested 6781; Never heard 195

-Svelete: Would not use 351; Not interested 5308; Would use again 2810; Interested 10308; Never heard 2954


Huge fan of Svelte!

I'll take the time to plug my side-project here: https://www.listenaddict.com/

Built with Sapper (Svelte) and Tailwind on the frontend, and Rails API as the backend. Total frontend load is less than 95kb (transferred, uncached).

I've been incredibly pleased. I've done a lot of AngularJS and React, and a fair bit of Vue and a little bit of Angular, and compared to those, it's been fantastic. Sure, the ecosystem is missing some things here and there, but all the built-in things more than make up for it. The documentation is incredibly simple to go through, and you can read everything in half a day (plus do the tutorial).

For future projects, I don't expect to or have a reason to go back to React (or Vue or...) unless something huge happens.


It makes sense this is happening. In my opinion, the barrier to entry for using Svelte is lower that for React or Vue, yet it still achieves equal -- and in some ways better -- results. To me, it provides what was promised by Web Components, but was never delivered on. From what I've seen, Rich is pretty open about discussing the good and bad of Svelte, and he seems committed to continuing it's improvement for years to come. Thanks Rich, Svelte gets my vote, and I look forward to using SvelteKit...already having "Great Success!" with svelte/sapper.

Or because svelte is not mainstream, it is used only by those who like it.

while react, vue and angular being mainstream, they are also being used by folks who may not be fully satisfied, but can't switch away to other tech


I wonder if this effect can be quantified. I do see this happening with niche programming languages

But React Scored 2nd and it's mainstream

To be fair to React, I think that's because it's actually a really nice library.

It certainly has its fair share of warts and gotchas, but I've been around long enough to have used several of the contenders in a prod env - Backbone & Marionette, Angular (both the original AngularJS as well as Angular 7 more recently), Ember, all the way back to just native js and jquery back in the day.

React with styled-components and typescript is the happiest I've been on the front-end in a long time.

I've been meaning to do a dive into Svelte, but I haven't found the time over the past few months - Would love to try using it for a small production tool to get a feel for it.


and vue was 3rd. but that's besides the point. my point is svelte has an advantage in such metrics as anyone who is slightly less than enthusiastic would ignore it and move on.

as such, it won't remain constant as svelte community grows


Since the typescript support released last year, svelte has been fantastic to use. I’m looking forward to trying SvelteKit!

Same! TypeScript made it even better.

There are dozens of us. Dozens!

Not sure why you're downvoted, because your post is true. Svelte's satisfaction score is kinda worthless, if it is used by a fraction of the number of people using React or Angular. For what it's worth, most of them are probably fanboys. There are simply not enough people to be dissatisfied with it.

Interest is another thing, but interest alone doesn't mean much.


React had a fraction of the people using Angular back in the day. Give it time. Svelte is where the puck is moving.

Sure, that is a possibility and I would love this. But for 2020 and the survey in general: satisfaction is a skewed metric. Take it with a grain of salt.

Agreed - it's not a given. that's the point - the puck /isn't there yet/. But if you were going to pick the next thing after Backbone, Angular and React, Svelte is your best bet.

I picked Linux when everyone used Solaris.

I picked Python when everyone used Perl.

I picked node when everyone used PHP.

I picked virtual DOM frameworks when everyone used Angular and Backbone.

Feeling confident picking Svelte.


No it won't. Svelte is untestable.

This is a nonsense claim. We don't provide an 'officially sanctioned' way to test components because we think that unit testing components is usually a waste of time. But Svelte is no less testable than any other framework

Some people don’t like fun here but I’m not deterred. (:

Personally, I love Svelte and am using it everyday (for at least a year). I hope to share V2 of the social network In building with it here soon.


You’re joking, but Svelte’s Discord channel has quite a lot of people and is very active :)

I would recommend anyone interested in Svelte to check out this channel, people are really nice and helpful there.


Haha, I love Svelte! I’ve been using it for at least a year, it’s my favorite JS framework.

Link?


Thanks.

Svelte channel on discord currently has 1714 users. Folks are very helpful there!

Maybe back in 2016 - Ractive, Rich's prior framework (that inspired Vue in many ways) had a few users that checked out Svelte. The compiler concept was pretty new and before Svelte 3 it changed a lot.

But now it's pretty common to be using or considering Svelte amongst the same folk that were the first to try Backbone, Angular and React back when they were the new framework of the day.

You can ask a question of StackOverflow and get an answer.


I'm using Svelte in a work project for the past month due to performance concerns as we are targeting low-end phones. I have experience with Vue, and the transition did take a bit of time but for now I prefer Svelte.

Svelte feels closer to the bare JS, and I'm learning a lot of what used to be abstracted on Vue. The community resources and related open-source packages are certainly not as comprehensive as React or Vue, but I think it's coming along.

Excited for svelte-kit to be released and will transition my project to it.


TLDR; check out AppRun

Somehow Svelte doesn't sit well with me. Anti virtual dom advocacy turns me away. The way they sell Svelte is thoroughly antagonistic.

I tried to read the documentation but I'm suspicious about HTML that is not HTML, and JavaScript that is not JavaScript and CSS that's not CSS. "It's reactive." doesn't instill any confidence in me that state manegent won't end up in tangled mess in my app.

I was checking out benchmarks to see if Svelte is actually as fast as they claim and it is faster but not faster then some of their more low key competition.

https://www.freecodecamp.org/news/a-realworld-comparison-of-...

While checking out benchmarks I noticed some framework called AppRun.

I started looking at their docs. Reading through that was a breeze. Very simple model of operation, state => view. Everything (also state modifications) goes through events. You can use it as SPA or just enhace your existing webpage with few AppRun components. You can use JSX if you like it or not. Languages don't have any custom extensions. It's just JS, CSS, HTML (JSX) (with single exception of optional custom directives).

You can use TypeScript, inspect state with Redux dev tools. And everything is faster and requires less code than Svelte.

https://apprun.js.org/docs/#/

https://medium.com/@yiyisun/i-also-created-the-exact-same-ap...


So you came here to recommend a framework you just found, looks exactly the same as hyperapp et al, and have no experience with, over others because of “virtual-dom advocacy”? Oh boy.

> Languages don’t have any custom extensions. It’s just ... JSX

I have news for you, JSX is a custom language extension, and a pretty deep one. I hear this a lot from React devs and it always irks me.

If anything, Svelte is the closest to writing pure JS, HTML and CSS you’ll find, outside of hybrid solutions like Alpine. You can literally write a div tag, plain styles, and a plain function and it will all work with zero framework boilerplate.

But back to the first point - why even bother to waste time judging and comparing? Just build something with it and see what the experience is like. That’s what matters.


I just came here to share what I learned yesterday about AppRun and about Svelte recently. Today I might read about hyperapp.

JSX in AppRun is optional. You can use lithtml or just html. https://apprun.js.org/docs/#/06-view-patterns

I'm not React dev although my last job was in React, previous was in Angular.js, the one before that in backbone.js and the one before that in jQuery, and the one before that in IE5.5 raw JavaScript.

JSX is pretty established and focused (optional) language extension which I was initially cautious about as well. Svelte extensions feel for me a bit more adhoc and mandatory.

I'm judging and comparing because I'm interested in frameworks and templating engines. Building stuff to judge something is fine but I have no need to build anything at the moment so I prefer now reading the code of stuff that other people have built and consider if it's a pleasant read for me. Svelte isn't same way angular.js wasn't. AppRun is, possibly even more than React was (at least the React before hooks).

EDIT

Hyperapp looks similar but as far as I can tell it doesn't have event bus.

I worked with one large project (google maps competitor) in raw JS that used event bus and it was really amazing how much you could understand about it just hooking yourself to the bus and inspecting all events that go through there, knowing that nothing happens behind your back.

So that's a clear win for me in AppRun vs hyperapp.

Although AppRun seems to have one event bus per component so hooking up to all of them might require a bit of effort and tickery.

Another thing is stateful components. Hyperapp doesn't have clear way of making stateful components. People are just winging it in various ways.


EDIT

Hyperapp looks similar but as far as I can tell it doesn't have event bus.

I worked with one large project (google maps competitor) in raw JS that used event bus and it was really amazing how much you could understand about it just hooking yourself to the bus and inspecting all events that go through there, knowing that nothing happens behind your back.

So that's a clear win for me in AppRun vs hyperapp.

Another thing is components. Hyperapp doesn't have clear way of making stateful components. People are just winging it in various ways.


I didn’t pose hyperapp as a better framework, just pointed out that there are not really any new concepts in AppRun, in fact the initial versions of React, Preact, and hyperapp, apprun , Mithril etc are all very similar in spirit. So it’s like pointing to Backbone as an “alternative” to a modern framework - not wrong, but it’s missing the point.

What I really wanted to say is that if you take more than 5 minutes to evaluate one of these, you might have a much better idea of it’s capabilities and maybe even learn something new.

It’s clear you’re excited about the subject and that’s great, but very little of what you said is true - for example, one of hyperapp’s main value propositions is the built-in centralized state management, so yes you’ll have to “wing” local state because that’s shoehorning a foreign concept into it. You are looking for something that fits your existing mental models, and not really judging their goals and strengths.


Coming from Angular, I would love to switch to Svelte.

The problem is, I need a comprehensive toolkit like PrimeNG or KendoUI. Didn't really find anything compelling for Svelte yet.


Not sure if this helps, but take a look at this https://ibm.biz/carbon-svelte

Svelte is still quite new. you would have better luck with vue. and much better luck with react if you can make the leap to it from angular

I learnt Svelte a few months ago and I am using to currently power my online delivery service. I had also tried react and angular but gave up too soon due to difficulty I faced while learning.

Earlier we were using PHP to power our website but after shifting to svelte we saw an approx 3x increament in terms of retention and order placement.


I personally found it interesting and I assume that will give some kick for Svelte. I personally have experience with React (CRA, Next.JS), Svelte (and Sapper). While I loved Svelte experience, Next.JS blown me away and unfortunately in stateofjs one was in selection list while other only could entered by user.

Picked this up for a Shopify JAMstack/headless project. I do like React Hooks, but this is an improvement. Sapper is what sold it to me, and SvelteKit (its successor coming later this year) will be even better as it’s powered by Snowpack. Highly recommend checking this out.

Svelte’s most annoying feature is if you want something reactive, put a $: before it. That’s the job of the damn framework! If I need to manage reactivity, I might as well write jQuery. React just works and has become mature. I tried Svelte and got pretty turned off by a few things. I urge people to the out their excellent tutorial, until atleast half way through to form an opinion. Don’t just jump on the new JS framework bandwagon.

Hmm. I'm not sure whether that's correct. $: is comparable to Vue's computed instead of a reactive value. Any variables in the component are automatically reactive. External Stores are reactive with a $ prefix.

Yeah, I know nothing about frontend frameworks (Angular was just getting started last time I did any frontend work), and having read about Svelte for the first time just now, the "$:" thing seems pretty reasonable to me.

    <script>
    let count = 0;
    $: doubled = count * 2;
    </script>

    <p>{count} doubled is {doubled}</p>
I'd be very confused if `doubled` were to somehow automatically update any time the value of `count` changes, if merely defined as a standard variable (e.g. `let doubled = count * 2;`). This would totally break my mental programming model.

I'm not sure what the parent commenter had in mind as an alternative, or how it could be made simpler or terser.


I've been wrong about all this, I need to go through the tutorials again and try to understand this better. Apologies.

You absolutely have to be conscious of reactivity and how that stuff works in React as well. This is complexity that you as a dev have to deal with in some way.

Svelte and React makes different tradeoffs in how they expect developers to deal with this.

Personally I think maybe Svelte makes a better tradeoff. I've seen so many people make variables instead of using useState, etc… because that's the kind of thinking they're used to.

In Svelte that would simply work for the simple cases, but you'd have to use $: someVar for the more complex cases. I think requiring having to deal with that complexity only when you need it is a more reasonable way to do it compared to React.


Well there are pros and cons, although I would not use Svelte for serious project I hope you cannot deny that it is awesome for small thing, giving you a bit more than just pure JavaScript. Main advantage I see is size, SPA build with few pages, will be a around 50Kb-100Kb and footprint of the project is of a similar size. Meaning super fast loading on a web page.

Same size of the project in React will take 100Mb of drive space, and something more serious in industrial environment goes easily over 1Gb of disk storage, although I love React I find that insane. Even "Hello World" build of React will range between 2MB and xxMb depending on config.


This just shows you haven’t actually tried writing code with it. Variables are reactive without the $ when used in templates. You only need it for derived expressions.

If you think reactivity is the frameworks’ job I see no reason to praise React at all - especially with hooks you will be manually handling dependencies and updates everywhere, feels like a huge step back.


- Svelte is a compiler that generates fast code, small bundle size and doesn't even need a DOM.

- Svelte embraces HTML and CSS as-is (no JSX, yeah!)

- Svelte reduces boilerplate and is easy to start with

- Svelte is elegant and needs less LoC

Svelte is great and will inspire a lot of other frameworks. That seems to be mirrored in the scores shown at StateOfJs.

Hopefully there will be more institutions to help Svelte with professional adoption.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: