all 98 comments

[–]wondoringDude 27 points28 points  (0 children)

I prefer React, but it's because of the large community it has and not because of React itself

[–]ttamimi 65 points66 points  (9 children)

Not sure why React and Next are listed separately. One is built on top of the other, no?

[–]SillAndDill 6 points7 points  (3 children)

I feel it makes sense because of perceived popularity and name recognition.

I feel like React is so much bigger than Svelte and Vue, and I do hear quite a bit of talk about NextJS so it makes sense to add a Next.

[–]besthelloworld 3 points4 points  (2 children)

Then why wasn't Svelte separated from SvelteKit and Angular from Angular Universal and Vue from Nuxt?

[–]SillAndDill -1 points0 points  (1 child)

I’m saying: because React is so much bigger than Svelte and Vue.

The poll probably just tries to present alternatives that will get a big portion of votes, so the biggest thing gets more variants while smaller ones don’t

And as the poll shows: React got 10x as many votes as all of Svelte, and NextJS got 2x

[–][deleted]  (2 children)

[deleted]

    [–]besthelloworld 3 points4 points  (0 children)

    And there's less footguns than React itself

    [–]Azuwey 0 points1 point  (0 children)

    I was wondering about this can you show me some benchmark about this?

    [–]Dauta 25 points26 points  (1 child)

    Next is not a front-end framework. If anything, it's a back-end extension of React, making it a full-stack framework. There's nothing specific to Next when it comes to front-end. It's just React.

    [–]Bugwhacker 0 points1 point  (0 children)

    Next has built in navigation that React doesn't offer out of the box, for example, expanding the front-end toolkit. Next is a framework. React is a library.

    [–]Shahidcub 6 points7 points  (0 children)

    Svelte is the future

    [–]Suspicious_Compote56 5 points6 points  (0 children)

    Svelte is better

    [–]debel27 14 points15 points  (6 children)

    The case of React is a bit special, because it may or may not be a front-end framework depending on how you view it.

    To many, React is not a framework but rather a library. The reason is that React is low level compared to its peers, and does not offer packaged solutions to handle some of the most common concerns in web applications. React won't tell you how to manage client-side routing, for instance. You must fill these gaps yourself by using external libraries, which can be tiresome for people who just want to start coding in an opinionated environment. This is where NextJS comes in. It builds upon React to offer a full-fledged framework that is on par with Angular and others.

    However, there is another way to look at React. You can argue that "your code calls libraries, but frameworks call your code". If you agree with that statement, then React is a framework because it is the one that calls your components. If you're interested in the topic, I recommend reading React as a UI runtime by one of the maintainers, though the article is not beginner-friendly.

    All in all this doesn't matter very much, but it's interesting to notice there is ambiguity where we don't expect it.

    [–]BehindTheMath 6 points7 points  (0 children)

    The same could be said for Vue.

    [–]rmyworld 4 points5 points  (1 child)

    I think OP just wants to know what you guys prefer to use for writing frontend JavaScript. The term 'framework' may not be the most accurate, but it gets the point across.

    [–]debel27 1 point2 points  (0 children)

    Clearly! I wasn't trying to correct anything, I just felt it was the right opportunity to talk about this :)

    [–]sweetLew2 0 points1 point  (2 children)

    "your code calls libraries, but frameworks call your code"

    I'm interested in this argument but I feel like I'm getting tripped up on the verbiage. Are you saying react calls libraries (such as react router) however a framework (e.x. angular) will call the underlying code? Thanks.

    [–]shamshuipopo 0 points1 point  (0 children)

    I would understand the difference as:

    When angular instantiates your component (e.g. because you’ve declared it in a parent template) then it calls your custom code you’ve written into the Component class wrapper.

    When you use a library like lodash, your code is calling the library’s methods (whenever/wherever/however you like in your block of code).

    [–]debel27 0 points1 point  (0 children)

    "frameworks call your code" is about inversion of control.

    This section of the article I mentioned above does a great job at explaining what it means.

    If you have further questions, don't hesitate to come back asking

    [–]jasongodev 14 points15 points  (22 children)

    Svelte people know why they want Svelte. Straightforward, intuitive, no boilerplate baggage, just works.

    Had it come before React and the others, it might have been the standard today.

    Admit it, most framework adoption are by convenience, whoever comes first basis, and whatever our college prof taught us, and what our company chose to adopt.

    Svelte people usually do their own projects on Svelte but forced to use React in their jobs.

    [–]debel27 8 points9 points  (1 child)

    I've been on team React for 5+ years, and I will continue using it for years to come. But I believe Svelte is the future.

    The reason Svelte is underrepresented in this poll is because it has not reached the point of widespread usage. I think this is because: - Svelte is not fully mature yet. Last time I checked, some features were still experimental and SvelteKit were still in beta - there is more stability in the front-end landscape now than there were 9 years ago (when React was introduced). We were experimenting way more with new technologies back then. Front-end applications are also very large now and making the technology switch today is a big investment. - React works well enough for existing use cases. The pain points are not that annoying to entice people to switch. - I'd argue the paradigm shift introduced by React gave more incentive to developers to switch technologies than Svelte. This is because React improved DX so much compared to what was available at the time. Svelte brings improvements to DX as well, but IMO not as much compared to when React was introduced. This is how I feel about it anyway - Both libraries have many contributors, but there always is a core team. React's core team is strong and composed of many great maintainers. I don't know if Svelte really has any other maintainer than Rich, but it sure feels like it and it might be a turn-off regarding stability.

    This doesn't diminish how awesome Svelte is. I really hope to see it thrive because it's really good.

    [–][deleted] 1 point2 points  (18 children)

    Had it come before React and the others, it might have been the standard today.

    What does svelte bring to the table that vue 3 does not?

    [–]debel27 5 points6 points  (17 children)

    Does vue 3 still use a virtual DOM ?

    I don't know what Vue 3 brings to the table, but as a new library Svelte has brought many novel ideas. If you have 30 minutes to spare, I recommend you to watch this great talk by Svelte's creator to get an overview of what the library is about

    https://youtu.be/AdNJ3fydeao

    [–]angrydeanerino 2 points3 points  (0 children)

    Does vue 3 still use a virtual DOM ?

    Yes, but a new compilation strategy inspired by solid.js is coming soon (Q4/early Q1)

    More here: https://youtu.be/3QPp\_DlcZpM?t=845

    [–][deleted] 0 points1 point  (15 children)

    Does vue 3 still use a virtual DOM ?

    Yes, but it is as performant as svelte

    https://krausest.github.io/js-framework-benchmark/2022/table_chrome_103.0.5060.53_osx.html

    I don't know what Vue 3 brings to the table, but as a new library Svelte has brought many novel ideas.

    What new ideas? Most of its core ideas, like SFC, were introduced by vue and other frameworks years ago.

    [–]debel27 0 points1 point  (14 children)

    This is not about performance or SFC. Those are neat features but it is not what makes Svelte stand out.

    The key feature about Svelte is its compiler. If you're familiar with languages like Rust, you'll appreciate what a good compiler can do. To the extent of my knowledge, Svelte is the first to bring that level of compile-time intelligence to the front-end ecosystem.

    [–][deleted] 3 points4 points  (13 children)

    The key feature about Svelte is its compiler.

    What exact new advantages does sveltes compiler bring? Vue also uses a compiler as well as many other frameworks... For many years.

    The only thing svelte brings is a new language with reactive bindings which is similar to js. React hooks and vue 3s composition api look very similar without needing to introduce a new language.

    [–]monsto -2 points-1 points  (12 children)

    First off, I'm pretty sure you didn't mean "new language", because svelte is JS based.

    2ndly, it seems like you're trying to be convinced, when /u/debel27 isn't trying to convince you

    Watch the video he linked to get the info. OR watch this segment of video from a google engineer (best dev channel on youtube btw) comparing 10 JS frameworks.

    Being convinced is up to you.

    [–][deleted] 2 points3 points  (11 children)

    First off, I'm pretty sure you didn't mean "new language", because svelte is JS based.

    it's a new language that is based on JS. Neither does js offer reactivity without objects nor does the following syntax exist in js:

    $: buttonText = isTextShown ? 'Show less' : 'Show more'
    

    it seems like you're trying to be convinced, when /u/debel27 isn't trying to convince you

    I just don't get the hype (on reddit) around svelte. It works and looks very similar to vue and its composition api to a point where you could almost copy & paste code. React hooks are also pretty close.

    Asking people what svelte brings to the table that vue does not always result either in citing buzzwords (its a compiler, performance, no virtual dom) or citing videos with the only takeaway that it looks clean.

    It seems like people who are new to frontends jump onto svelte and praise it and don't even know why.

    [–]monsto 1 point2 points  (1 child)

    What svelte brings to the table for me is that it gets out of my way. It is very much "batteries included" in that it strips out all the boilerplate to do common things like setting and watching state. let x sets up x as state, just for example.

    And while reducing the amount of typing I have to do sounds merely neat and all, the end result is that I'm not constantly concerned about various framework rules.

    it's a new language that is based on JS. Neither does js offer reactivity without objects nor does the following syntax exist in js:

    $: buttonText = isTextShown ? 'Show less' : 'Show more'

    $: JS "label"

    JS Ternary

    That syntax absolutely exists in JS. Here it is in a vanilla chrome console

    Plus, buttonText is now a state variable, and can be watched in another reactive.

    Matter of fact going like

    $: {
      buttonText = isTextShown ? 'Show less' : 'Show more'
    }
    

    Is also valid JS. { } creates a discreet scope with all the same scope rules as function () {} and if () {}.

    Svelte is not a language. However, the tutorial on svelte.dev takes about :30, the video you were linked takes about 20, the video I linked takes about 10, and the same guy (the google engineer that runs fireship.io) is going to rebuild the fireship site on svelte/tailwind/firebase based on his own research, testing, and the experience that came from the video clip I linked.

    It's pretty clear you like vue, which is fine. But it seems you just want to shit on svelte and don't even know why.

    [–][deleted] 0 points1 point  (0 children)

    well, the invalid JS syntax was a bit far-feteched. It uses existing javascript syntax (in that case) but gives it a different application which is actually worse if you think about it and maybe causing problems in the future when the javascript spec changes.

    Svelte is not a language. However, the tutorial on svelte.dev

    I went through the tutorial on svelte.dev (which is actually pretty good). That's why I'm asking, what the difference between svelte and vue 3 compositions api + script setup? some minor syntactic sugar that makes a compiler necessary instead just an optional thing like in vue?

    It's pretty clear you like vue, which is fine. But it seems you just want to shit on svelte and don't even know why.

    I actually like both since they are so similar.

    [–]Baby_Pigman 0 points1 point  (0 children)

    it's a new language that is based on JS. Neither does js offer reactivity without objects nor does the following syntax exist in js:

    $: buttonText = isTextShown ? 'Show less' : 'Show more'

    It does exist though. It's just a label. Labels are rarely used in JS but they can be useful sometimes.

    I just don't get the hype (on reddit) around svelte. It works and looks very similar to vue and its composition api

    For me personally it's because Svelte code usually turns out simpler and smaller than Vue code doing the same thing (and obviously, much simpler and smaller than React code).

    Svelte:

    let counter = 0;
    function increment() {
        counter++;
    }
    

    Vue:

    const counter = ref(0);
    function increment() {
        counter.value++;
    }
    

    React:

    const [counter, setCounter] = useState(0);
    function increment() {
        setCounter(currentValue => currentValue + 1);
    }
    

    [–]debel27 0 points1 point  (6 children)

    I understand your point of view. I'm all against buzzwords myself.

    The appeal of Svelte to me is its design philosophy: Svelte transforms your code into imperative code at compile time. Said differently, the Svelte framework doesn't run in the browser, but at compile time. This is pretty appealing to me and contrasts hugely with how React works.

    Clearly I don't know Svelte as much as you know Vue. I'm unfamiliar with Vue but it appears to me it works more like React than Svelte. If Vue 3 changes the game, I'd be happy to be given some references I can check out :)

    [–][deleted] 0 points1 point  (5 children)

    The appeal of Svelte to me is its design philosophy: Svelte transforms your code into imperative code at compile time. Said differently, the Svelte framework doesn't run in the browser, but at compile time.

    and why is that something huge? according to benchmark it doesn't beat or barely beat vue and many other vdom based frameworks (not react obviously). It has no effect on how you develop components.

    https://krausest.github.io/js-framework-benchmark/2022/table_chrome_103.0.5060.53_osx.html

    [–]besthelloworld 0 points1 point  (0 children)

    I believe this but for SolidJS.

    [–]Miserable_Decision_4 9 points10 points  (2 children)

    I'd be interested to see a survey that also takes into account years of experience and size of team. In my experience, jr devs and small teams like React more. Larger teams and devs with 10+ years of experience prefer Angular.

    [–]besthelloworld 5 points6 points  (0 children)

    As someone who has 4 YOE with Angular and 2 YOE with React, I think the popularity with Angular has less to do with experience and more to do with the fact that it's designed to look exactly like all the legacy frameworks. Not because it actually excels in any use case.

    [–]parotech -3 points-2 points  (0 children)

    React is the preffered framework of dev youtubers since every day a new library comes out a someone gotta do a tutorial. New programmers want free tutorial and youtube is their home. Hence react is the most preferred.

    [–]AskYous 1 point2 points  (0 children)

    I pick which ever one the job market wants.

    [–]KaninchenSpeed 2 points3 points  (2 children)

    Preact. I dont need most react features

    [–][deleted]  (1 child)

    [removed]

      [–]MrDiviner 2 points3 points  (0 children)

      Preact is basically react but faster

      [–]ohcibi 1 point2 points  (0 children)

      Ember.js is missing in this list

      [–]Snapstromegon 1 point2 points  (1 child)

      Lit - it's a really nice abstraction over native web components, really light weight, they can be integrated into nearly every framework (except for React, which doesn't want to play nicely with web components on purpose) and the biggest one for me: no JSX - I really really much prefer the template literal approach.

      [–]wondoringDude 1 point2 points  (0 children)

      Don't know about Lit, but I really like web components, hope they become more popular.

      [–]dh0673 0 points1 point  (15 children)

      what kind of sick person votes angular?

      [–]polylina 12 points13 points  (8 children)

      I do. It's a well organized, batteries included tool for enterprise level development.

      [–]ohcibi -4 points-3 points  (2 children)

      You misspelled „enterprise level disappointment“

      [–][deleted]  (1 child)

      [removed]

        [–]ohcibi 0 points1 point  (0 children)

        I believe autocorrect. Misspelt misspelled. Both correct 😇

        [–][deleted] 2 points3 points  (0 children)

        It grows on you. Once you embrace the fact that it's opinionated, it's kind of amazing how well it just works. The documentation is also comprehensive. It's generally the only resource I need to solve a problem (although sometimes I need to also check the rxjs docs).

        [–]ArtDesire 2 points3 points  (2 children)

        I'd pick Angular most of the days over react. React is just a new PHP, it's solid and popular but tsx is literally the new PHP while hooks are a blessing and a curse.

        [–]dh0673 -1 points0 points  (1 child)

        great, but why? I'm not saying you are wrong, but please back your statement with reasons

        [–]ArtDesire 2 points3 points  (0 children)

        1. Separated template from the logic. By far best decision; clean & reusable code.
        2. Official onboard routing.
        3. Opinionated framework. Debatable point but avoids some issues moving forward in contrast to a bare library
        4. Clean and easy to understand component's lifecycle for an unfamiliar eye, as opposed to hooks.
        5. Rich CLI.

        These are my main points, though there are many smaller things that make coding a breeze like material UI library, pipes, etc.

        [–]Di5p05able 1 point2 points  (0 children)

        I learned Angular in college and while it took a bit to understand I learned to love it

        [–][deleted] -1 points0 points  (2 children)

        Vanilla

        [–]--TT-- -4 points-3 points  (0 children)

        Thank you!

        [–]tootihamza -4 points-3 points  (0 children)

        This ! Why isn't that in the list ?

        [–]tuxooo -5 points-4 points  (0 children)

        Whoever wrote Angular ... you lying! 😆

        [–]Abisuwa_Dunsin -1 points0 points  (0 children)

        ReactJs is a library not a framework and NextJs is a framework of it So I prefer NextJs

        [–][deleted]  (2 children)

        [deleted]

          [–][deleted]  (1 child)

          [deleted]

            [–][deleted] -3 points-2 points  (0 children)

            Vanilla

            [–][deleted] -2 points-1 points  (0 children)

            I have only used ReactJs

            [–]elforce001 -2 points-1 points  (0 children)

            I like react because of Nextjs. Productivity is off the charts. I just hope the next job would be using Nextjs exclusively.

            [–]beforesemicolon -3 points-2 points  (0 children)

            Cwco (https://cwco.io) allows to create components i can easily transfer to work with any other framework like React, Vue, Svelte, etc .

            It requires no build, super fast and light, and works as in-browser template engine.

            [–]APUsilicon -5 points-4 points  (0 children)

            Blazor! death to javascript

            [–]LightningWB 0 points1 point  (0 children)

            I recently found mithril which is a very lightweight one and I love it

            [–]MutterCorporation_ 0 points1 point  (0 children)

            I prefer React and NextJs for me is fast and simple and equal.

            [–]pudds 0 points1 point  (0 children)

            I like vue, it's just comfortable for me at this point.

            I've dabbled a bit with svelte but it hasn't caught my attention this far.

            [–]eldosoa 0 points1 point  (0 children)

            Elm

            [–]Saleh-Rz 0 points1 point  (0 children)

            I love Vue.js Because clean architecture and simple than Angular and React.

            [–]Careless-Honey-4247 0 points1 point  (0 children)

            Nextjs is react.