DEV Community

Sloan the DEV Moderator
Sloan the DEV Moderator

Posted on

Which JavaScript framework should I choose?

This is an anonymous post sent in by a member who does not want their name disclosed. Please be thoughtful with your responses, as these are usually tough posts to write. Email sloan@dev.to if you'd like to leave an anonymous comment or if you want to ask your own anonymous question.


Angular, React, Vue, Ember, Node... there's quite a few different JS frameworks out there.

How would you go about choosing a JavaScript framework to learn or to use in a new project?

Top comments (44)

Collapse
 
neoprint3d profile image
Drew Ronsman

React is probably the best one because it's the industry standard and has one of the biggest communities you cannot g wrong with react

Collapse
 
eshimischi profile image
eshimischi

Not the best, just overhyped by the community related to FB. No actual pros over Vue, for instance.

Collapse
 
guitarino profile image
Kirill Shestakov

There is no best framework - it is a personal preference, always.

I'm no fan of FB whatsoever, but I've also worked with React extensively, and all I can say is that it's not overhyped. It is widely used and is fast enough, convenient, good in terms of code quality and DX, and that's exactly how it's portrayed officially and in dev circles.

Thread Thread
 
eshimischi profile image
eshimischi

By “overhyped” i meant only popularity because of a community of huge FB clients, co-dependent companies and etc, only that, without all these it would have not been possible. Agree about personal preferences. I began with Vue and still prefer it more. PS: hate JSX/TSX, lol

Thread Thread
 
guitarino profile image
Kirill Shestakov

I could agree that up to 2014, React's popularity was tied with FB. But, in 2022, could it be that the main reason for React popularity is that it is a personal preference for a large percentage of software devs?

Thread Thread
 
eshimischi profile image
eshimischi • Edited

Well in mean time other frameworks had some issues: Typescript support, lack of boilerplates and projects, so it leaded to choice of React, but nowadays all frameworks have everything under the wing, no issues. And within this small period many devs involved in React development process, created a lot of tools, libs and etc, so..

Thread Thread
 
guitarino profile image
Kirill Shestakov

TypeScript itself wasn't popular until relatively recently. I don't think that can count as a main reason for React's popularity.

I think we will go on further and further towards a debate route, and I don't feel like debating. I find more value in being honest, doing best to stay objective and sticking with reality of the situation even if it goes against my personal preferences.

Thread Thread
 
eshimischi profile image
eshimischi

I have no reason to argue your personal preference, chap. We are free to choose any of tools, as i said above “they are all solving the same type of tasks”.

Thread Thread
 
guitarino profile image
Kirill Shestakov

We didn't argue a personal preference. We argued the main reason for React popularity, which is an objective topic.

Collapse
 
neoprint3d profile image
Drew Ronsman

It may not be the best but it has a far larger community and is more widely adopted

Thread Thread
 
eshimischi profile image
eshimischi • Edited

Not arguing this. But the size of community has pros and cons. Doesn’t matter what framework you would choose, they are all solving the same type of tasks, matter of taste which one to use

Thread Thread
 
neoprint3d profile image
Drew Ronsman

Chill dude I know people get touchy about their frameworks just trying to give a set in stone answer cause saying any framework just leads Sloan to square one and has to figure out the framework again

Collapse
 
cuongnguyen11 profile image
cuongnguyen11

I have worked with vue and react for years, I think learning React first is better because if you know React, you also know Vue.

Collapse
 
viiik profile image
Eduard

So if you had to convince me to use vue over react, what would be your main arguments ? I'm curious, maybe it's time for a change of airs.

Collapse
 
aarone4 profile image
Aaron Reese

If you just want to learn A (as in any) framework and you have relatively little front end /js experience I would start with Vue and opt for Vue 2 or Vue 3 with the Options API. You can start Vue from a CDN and without a toolchain/bundler and there is good support for both bootstrap and material design UX libraries
Jobs wise React is probably the most in demand but in my opinion has a much steeper learning curve as there e more decisions to make about which router/data store to use.

Collapse
 
dagnelies profile image
Arnaud Dagnelies

Same opinion here

Collapse
 
cerchie profile image
Lucia Cerchie • Edited

If I had no experience with any of these frameworks, I'd ask someone who does. I'd tell them the goal of my project (build an SPA? deploy a server?) and ask about the pros and cons of building it with different frameworks. It takes experience with lots of different frameworks to get to know them and their quirks, and why certain frameworks are better than others for certain projects.

If I had experience with the frameworks, I'd ask the same questions. What am I building? Why? Which framework can support my final vision best? Which framework can support me in the long-term while offering flexibility?

Collapse
 
bradtaniguchi profile image
Brad

How would you go about choosing a JavaScript framework to learn or to use in a new project?

It depends more on the project and less on the framework. Capabilities wise each of them can end up producing a similar experience.

Another way to think of it is more of a longer term view of why you'd want to learn a framework in the first place, or front-end dev, or web dev, or even why you want to be a dev at all!

Depending on how you answer that longer term view, you can start back-tracking and maybe picking one of the frameworks that align with your goal indirectly. If you want to learn to get a job, then I'd check out the job postings in your area to see what people are looking for. React is the most common and popular overall, but Angular is more popular in some areas, and Vue has its own smaller following here and there.

Again, this is a longer term view and no one says you have to learn only 1 thing. There isn't anything stopping you from learning or looking into each of these and comparing them at a more practical level either. Its just worth keeping things in context of how much time you want to spend now, and how much time you want to spend specalizing later to achieve those longer term goals.

Regardless, of what you pick enjoy and goodluck!

PS. CuriousDev is right with node not being a framework either, it's very much "its own thing" compared to the rest, so I wouldn't include it in this list. If you want to build back-ends without learning a new language you use nodejs to run your JS code outside the browser.

Collapse
 
eljayadobe profile image
Eljay-Adobe • Edited

I'd pick Angular, because that best fits with my style and how I think of the problem domain.

Assuming I don't go crazy with the cheez whiz and use Elm.

Also, don't undervalue the power of Vanilla JS.

Collapse
 
joelbonetr profile image
JoelBonetR 🥇 • Edited

Node is meant to provide Backends with JavaScript, moreover Node JS is a Runtime Environment and not a framework.

Regarding the rest and assuming you want to find a job as a developer, React will be the way to go.

npmtrends.com/angular-vs-react-vs-...

The more projects on a tech, the more the demand and thus easily to find a job using it.
As extra info, React is a library, not a framework. If you want to add a framework on the stack you can first learn React and then jump on Next JS (which is a React framework).

Cheers!

Collapse
 
liliang8858 profile image
edwin_ew

React , Next JS

Collapse
 
guitarino profile image
Kirill Shestakov

Just choose one and move on to doing good stuff with them. Whatever framework you choose, you are likely to run into "issues" with them. Maybe you will dislike that it has too much boilerplate, maybe that it tries to do too many things, maybe that it's not flexible enough, maybe code written in it looks ugly no matter what you do, maybe that it's made by Facebook. Probably you will learn to love these annoyances, maybe you won't see them as problematic, maybe you will dislike them so much that you start looking for another framework, where the cycle will repeat. This is just to say that this applies to all frameworks, and the prolonged choosing is futile. What matters is not the tool, but what you build with it: your ideas, your creativity, your inspiration, your imagination, your contribution to others and this world. And choosing a framework is not the end of the world: in reality everything is in flux and keeps on changing, and frameworks often change when you move from project to project. So why keep choosing and why not start building your ideas, right now?

Collapse
 
s_aitchison profile image
Suzanne Aitchison

I think like others have touched on there's no one framework that's "better" than another, so the choice should really come down to your goals and preferences 😄

If you're looking to learn a framework for the potential job opportunities, you might find React is the most widely in demand (although check job postings for your area - it could vary!).

If it's just to have some fun learning and gain experience generally, I'd say check out the docs for a few of them and choose the one that you think is going to support you best in your learning journey. Many of them share commonalities and they all help orient you to a "framework way" of thinking.

For me, if I was spinning up a little side project like a blogging site, I'd avoid a full-blown framework and go for something light and (relatively) simple like Eleventy.

For a professional project I'd want to consider the potential feature set, existing architecture, and team preferences before proposing anything. Quite often the best framework for the job is just the one that most devs on the team are comfortable working with already 🤷‍♀️

Collapse
 
stradivario profile image
Kristiqn Tachev • Edited

You can check out @rxdi and @gapi

Here is a starter for Client side application for @rxdi based on Lit Html

github.com/rxdi/starter-client-sid...

Here is a starter for Graphql API called @gapi

github.com/Stradivario/gapi-starte...

The namespaces and monorepos can be found here

@rxdi
github.com/rxdi/rxdi-monorepo

@gapi
github.com/Stradivario/gapi

There are plenty of packages for various of things created to help building more sustainable and predictable code.

The last thing that i have created which uses both of the infrastructures is called @rhtml which serves for Reactive HTML

github.com/r-html/rhtml

There are really awesome resources out there and some things that you cannot even expect from frameworks. Like a new mindset of how to write efficient HTML.

Please feel free to ask me any question regarding the frameworks but i think most of you guys are gonna love it :)

I am doing everything from my hearth and basically part of my life is inside of these libraries.

Some back story about me is that i created a company called Reactive Solutions LTD which is a software company and i wanted to give my customers the best possible products for a fraction of the time which will cost the people to build up the software.

How i am doing this ? Actually with a good tooling where everything is tested and predictable

So far so good i am a happy person which uses open source software to build up corporation software in no time.

Last thing which is quite important is that i have managed to create 2 Dependency injection frameworks one of which is production grade based on rxjs @rxdi/core github.com/rxdi/rxdi-monorepo/tree... it is more of a battle tested framework with tons of packages created out there. The other dependency injection framework is the smallest i think ever made in typescript at the moment and it is called @rhtml/di github.com/r-html/rhtml/tree/maste... it only weights 1.4 Kb and with reflections it is 2.49Kb

The awesome part is that almost 60% of the packages can be used in the new so called Deno (Typescript superset with Rust API at the back)

I also started to do some more digging onto how to use Streams to process server side rendering and use the same frameworks without rewriting anything so i come up with one library which i called Litre stands for Lit Rendering Engine and you can find the repository here in my personal profile at the moment github.com/Stradivario/litre

Cheers and i wish you all luck :)

Collapse
 
wrench1815 profile image
Hardeep Kumar • Edited

If you want to keep to the roots of traditional web structure (html file with html code css and js stuff you know typical webpage) or you aiming for simplicity but powerfull features too, I'd recommend Vue js. And go a step further to Nuxt js and voila you'll be spending more time on designing rather than configuration.
And you don't even need to know "that much" to start using vue js or Nuxt. Basics of js with Dom and some promises are more than enough to getting started.

Note: Nuxt 2 is the main stream version atm Nuxt 3 being in beta.