DEV Community

loading...

Which JavaScript frameworks are worth learning in 2021?

Ben Halpern
A Canadian software developer who thinks he’s funny. He/Him.
・1 min read

I am sure there are no right answers on the topic of JavaScript frameworks, but maybe this discussion will still prove useful if anyone wants to weigh in. Don't worry too much about the distinction of "framework" vs "library".

Feel free to vouch for the popular ones, or offer a lesser-known answer.

Discussion (109)

Collapse
katieadamsdev profile image
Katie Adams

Where my Vue devs at? All frameworks have their merit honestly; I'd say think about what core skills you really want to hone and pick a framework that will aid/reinforce those values. Personally, the lack of barrier to entry with Vue was a massive plus for me and to this day I'm yet to find something it can't do for me. I also think it'll give me a good basis to learn Angular at some point in the future. React is quite heavy on the JSX which, if you're not a fan of, might be a reason to give it a miss. However, it's very popular and common among lots of big companies, where there will be lots of good guidance and teamwork to support learning. Gatsby is one I want to learn desperately as GraphQL is something I'm keen on understanding and a framework that goes hand-in-hand with it seems like an opportunity. Smaller frameworks? I'm intrigued by EmberJS a lot. 🤔 There really is no right answer; framework choice is incredibly personal and will likely depend on the type of project you're wanting to work on. :3

Collapse
maureento8888 profile image
Maureen T'O • Edited

Vue dev here! I agree with the low entry barrier of Vue. I love Vue because of its separation of concerns with the HTML, CSS, and JS. I found React a little "artificial" in its JSX but would be worthwhile to learn at some point. I haven't yet found a pain point for Vue.js yet and find it just what they say, "incrementally adoptable" 💚

Collapse
katieadamsdev profile image
Katie Adams

Completely agree with what you've said here! Especially the point about separation of concerns. 😁

Thread Thread
terpinmd profile image
terpinmd

Just pointing out that react is a UI library so jsx along side of javascript is fine. You can have services or hooks that don't have JSX in them.

Thread Thread
katieadamsdev profile image
Katie Adams

JSX just might be a shock to the system, for those who've not encountered it before, that's all I meant. Never was against JSX as a concept :)

Thread Thread
xowap profile image
Rémy 🤖

Not a shock at all, I was quite used to JSX for a long time before its release and that's why I hate it. Anyone heard of PHP?

Collapse
arvindsridharan profile image
arvindsridharan

Thanks for your opinion about Vue. Currently I am solidifying my JavaScript basics. Will try Vue after a month.

Thread Thread
katieadamsdev profile image
Katie Adams

Hey, that sounds great! Definitely get that core JavaScript knowledge down first. That'll serve you well no matter the framework. Good luck and have fun!

Thread Thread
arvindsridharan profile image
arvindsridharan

Thanks

Collapse
nicozerpa profile image
Nico Zerpa (he/him)

Vue.js has a fantastic pro, and it's that you can add it to legacy projects with a simple <script> tag. That's how I used it for the first time.

Collapse
katieadamsdev profile image
Katie Adams

This is really good point, you're so right!

Collapse
parsepec profile image
Parsepec

Try gridsome its like gatsby but for vue, it also uses graphql

Collapse
katieadamsdev profile image
Katie Adams

This is a great tip, thank you. I'll check it out :)

Collapse
danroc profile image
Daniel da Rocha

Vue Dev here. Just love it, especially the community around it and the sense that it is a community-led project from the ground up. I do wish there were more articles/libraries/projects focusing on it though. I often check out some exciting projects and then see they are only for React devs. React's popularity makes it a good framework to learn as well, with lots of job offers out there, but also much more competition.

But in the end, if you know one framework well and understand the language and how to build well-structured apps, you can easily transfer your knowledge to other frameworks. Just go with what gives you pleasure as a dev!

Collapse
katieadamsdev profile image
Katie Adams

Couldn't have said it better myself!

Collapse
itachiuchiha profile image
Itachi Uchiha

I'm using Vue for 3 years. I am a little bit bored. Because there aren't enough Vue libraries. I found my needs for React. But I'm still using it. There is a lot of projects I've made with it.

Collapse
katieadamsdev profile image
Katie Adams

That's completely reasonable. Vue is very much in its infancy to React and there's A LOT of documentation, support, and community for the latter. :)

Thread Thread
itachiuchiha profile image
Itachi Uchiha

Yep but still has a huge community :)

Collapse
bertmeeuws profile image
Bert Meeuws

I have a pretty decent understanding of react and learning vue 3 atm.
You should really learn react and try out Gatsby. The plugins for gatsby are insane, take off so much of the heavy lifting.

Collapse
katieadamsdev profile image
Katie Adams

I've done a little React, and a lot of React Native. I'm v excited for Gatsby and the plugins you speak of sound awesome!

Collapse
sandordargo profile image
Sandor Dargo

VanillaJS :D

Collapse
somedood profile image
Basti Ortiz (Some Dood)

Ah, I see. A man of culture! 🥂

Collapse
kigiri profile image
Clément

still the best framework

Collapse
rishitkhandelwal profile image
Rishit Khandelwal

Agreed.

Collapse
jmau111 profile image
Julien Maury

Not a framework in the typical sense as it's a compiler, but Svelte is nice. The generated vanilla js bundle can be used to create specific modules or you can create entire website and app with it.

I'd keep an eye on Plenti (built upon Svelte) but it's still pretty young.

Other frameworks are great, but it's a lot of bytes to load. I'm still a big fan of gatsby, even React itself but only for "Rich apps" with many potential interactions.

Preact helps a lot.

Collapse
paulasantamaria profile image
Paula Santamaría

I've been experimenting with Svelte and I love it so far!

Collapse
alanmbarr profile image
Alan Barr

Svelte is pretty nice. There are some raw parts I'd love to see some attention to but much less overhead than a lot of the virtual dom frameworks.

Collapse
zzoukk profile image
zZouKk

Niiice Svelte is a love at first sight!

Collapse
jonrandy profile image
Jon Randy

You should check out RiotJS - it clearly inspired Svelte, and has been around a lot longer

Collapse
jaredcwhite profile image
Jared White

LitElement. IMO the best API in the business when it comes to my favorite native web technology: web components. Version 3 is about to drop and it's going to be amazing—it includes a framework-agnostic controller layer which lets you create reusable bits of functionality (sort of like "hooks") you can add to LitElement-based components or even React, Vue, Angular, etc. Boom!

Collapse
tunaxor profile image
Angel D. Munoz

Stencil ain't bad either if you fancy tsx I really like the way you can create design systems with it plus you can opt in to shadow DOM or just ignore it for the moment until you are ready for it

Collapse
nuwannnz profile image
Nuwan Karunarathna

LitElement is awesome, I recently created a complex injected chrome extension with it and it was great.

Collapse
madza profile image
Madza

I really like the approach of Svelte.
It brings us back to basics like the 2000s (HTML, CSS, and JS), while still using the best bits of the modern world like reactivity, components, etc. All the magic happens behind the hood (as it is a compiler). It's easy to pick up, concise, fast, and well documented.

Is it worth learning?
I would say it depends on personal workflow and job market priorities.
For personal projects or for clients that don't have a particular stack in mind for their product, I would say it is def worth playing around with.
Unfortunately, the job listings for Svelte are still pretty rare. So for those looking to work for larger companies and increase their chances of getting hired, I would say React is still a standard pretty much and would probably be a safer bet.

Collapse
ninofiliu profile image
Nino Filiu

How come nobody mentionned state of JS 2020's survey on frameworks? It does an excellent job at measuring the satisfaction, interest, usage and awareness across a huge number of respondants

survey

Collapse
lesha profile image
lesha 🟨⬛️

It gives the most obvious and boring answer to the question though. in 2020 you have 9 frameworks and 6 of them are well established ones. I personally would love to find something new, something that's under the radar still.

Collapse
bobbyiliev profile image
Bobby Iliev

As a Laravel dev, I would vote for Alpine.js!

Collapse
ky1e_s profile image
Kyle Stephens
Collapse
bobbyiliev profile image
Bobby Iliev

This is hilarious 😂

Collapse
simonini profile image
Alessandro

As a Rails Developer, I vote also for Alpine.js;
I found it very easy to integrate (with CDN and without Webpacker!).
Is also super easy to use.
For the more complex scenario, I also use vue (but remain that I hate webpacker setup XD).

Collapse
endymion1818 profile image
Ben Read

Does Laravel start with Alpine then? It was Vue last time I checked.

Collapse
bobbyiliev profile image
Bobby Iliev

You can choose based on your personal preferences.

I am a fan of the TALL stack: TailwindCSS Alpine Laravel and Livewire

Thread Thread
javier123454321 profile image
Javier Gonzalez

The TALL stack is the Get Stuff Done stack. Amazing for solo devs!

Thread Thread
bobbyiliev profile image
Bobby Iliev

Absolutely! 🚀

I could have not said this better!

Collapse
patricknelson profile image
Patrick Nelson

New to me... but seems intuitive after a quick look.

Collapse
iainfreestone profile image
Iain Freestone

I am very much still in React land and use Next.js for most projects. But am looking into both Blitzjs and RedwoodJS for my next project, both look very interesting and seem more much more opinionated.

Collapse
amorriscode profile image
Anthony M.

Really enjoy using Redwood for my projects. They just released prerendering too!

Collapse
patarapolw profile image
Pacharapol Withayasakpunt

Not sure what are the approaches into reducing interfaces between

  • Frontend and backend
  • HTML and JS (and CSS)

Perhaps this is one of them.

Collapse
maureento8888 profile image
Maureen T'O

Even though I took up Vue.js for its highly-recommended ease-of-learning for beginners, I'm beginning to see why Vue developers love Vue so much. It's clear where the HTML, CSS, and JS is and I personally find this a LOT less overhead than React.js with the JSX. I think another factor that pushes Vue to the top for me (other than Vue being incrementally adoptable!) is that its entire package is very small, especially after its v3 update (half the size of v2) and doesn't have a ton of overhead. But, overall, I don't hate on any frameworks (I don't want to, it makes me sad and contributes to nothing constructive) and think whatever works best for a given situation will do!

Collapse
patarapolw profile image
Pacharapol Withayasakpunt

I am looking at Stencil.js.

  • Web components, relying on shadow DOM, that is, separation of CSS.
  • CSS preprocessors are allowed.
  • JSX/TSX, resulting in full power of TypeScript.

I would say that JSX + TypeScript makes HTML strongly-typed, where you would normally lose typings at languages' interface; like between backend and frontend, and between JS and HTML.

Collapse
rhymes profile image
rhymes

Yesterday I was literally reading up about the differences between Turbo, StimulusReflex, htmx and others :D

Collapse
buphmin profile image
buphmin

As primarily a backend developer I would be happy to recommend NestJS w/ fastify adapter. My team and I spent a bunch of time researching which framework gave us tools to implement business logic without too much bloat. We looked at minimalist ones like express/koa to full stack like sailsjs. We found NestJS to be a happy path for us in terms of features without being overbearing. Our internal tests found NestJS using the fastify adapter to be about 3.5x faster than express which was a nice bonus.

As far as front end, I would be happy to recommend Vue or back to basics VanillaJS. Vue is great for building all kinds of apps and my brain finds it much much easier to use than React for data driven applications which is all work on. And honestly I think it is important to know how the browser works so no framework is good to know.

Collapse
davidbindloss profile image
David Bindloss

Vanilla JS - not enough new devs know enough about the base API and interface that Javascript has with a browser.

Moreover, new developers are very happy to include a mass of frameworks, extensions and build pipelines to their code without having much of an idea of what they do or how they affect the work they produce.

Learning a single framework to be "your framework" can be super dangerous. What if that framework falls out of favour? I mean, learning is always part of the job, but imagine having to switch from React to Vue while trying to support a live product. That's the stuff of nightmares.

If new developers start their knowledge at the bottom level, rather than through the lens of an opinionated framework then picking up framework x no longer becomes a problem.

Collapse
zzoukk profile image
zZouKk

SvelteKit for sure !!

Collapse
etienneburdet profile image
Etienne Burdet

Svelte is hardly a bad choice. People—me included—are happy with it, it's a significant step in terms of performances, it's easy to learn.

Not a framework, but I really want to dig into lit-element. It feels so light.

And of course, Hotwire 😎⚡️

Collapse
javier123454321 profile image
Javier Gonzalez

Vue is great for large projects, but I have been trying the TALL stack (Tailwind, Alpine, Laravel, Livewire) for a pet project that I am building on the side by myself and Alpine is amazing for small projects like that. Actually the TALL stack is awesome for solo devs looking to make a full stack browser based app quickly and robustly.

I have used Alpine also for landing page type projects and, to me, it's for ES6 what JQuery was for JS before ES6. It feels like a full on framework when you are using it for simple things. It fails at scaling and creating components, which is why it is a great pair with livewire, so I wouldn't use it for large systems. However, I definitely recommend checking it out if you haven't.

Collapse
simonini profile image
Alessandro • Edited

I'm used to BAR 🍻 (bootstrap, alpine, rails)
Very fast for solo dev prototyping.

Collapse
yagmurmutluer9 profile image
Yağmur

If it is their first framework, I suggest Vue. I'm a newbie too. I learned Vanilla JS around three months and now I'm easily adapted with Vue. But I'm looking with "learning" perspective.. if it's a project, job or different background etc it depends.

Collapse
andrewbrown profile image
Andrew Brown 🇨🇦

MithrilJS 🙃

Collapse
wolfhoundjesse profile image
Jesse M. Holmes

I was coming to say this, too, in case anyone wants to flex their functional chops. It's a neat project!

Collapse
junihh profile image
Junior Hernandez

I love Vue.js and with the improvements added in v3, it has become an almost mandatory framework in every front-end programmer's repertoire, but its merits have yet to help it gain ground in commercial enterprises who are still leaning by React.js.

That interest is due to its key element: React Native. With the same programming syntax you can make a front-end application, a PWA, a server-side hybrid application (Next.js, Gatsby.js) and a mobile application (semi-native).

I suggest Vue.js but also React and React Native. First of all the latter for mobile, because the hybrid attempts with Vue.js (Ionic and Vue Native) leave much to be desired.

Collapse
betula profile image
Slava Birch

I think in 2021 can be popular two types of frameworks.

  • Maximally simple and light, same as use-between
  • Grown out of "redux", but made the number of stores unlimited and supplemented their set of functions for working with data streams, same as effector

But the mainstream of vue, rxjs, angular, and redux will be saved. These are giants who will not go anywhere next year for sure)

Collapse
gablaroche profile image
Gabriel Laroche (he/they)

I think Vue is the way to go! Before Switching jobs and using Vue, I (or more specifically my previous employer) was using React + Next.JS and it was great, bot of these are powerful and get the job done, but I feel like the react documentation is lacking and for a while when hooks came about, our projects had a mishmash of class components and hook functions, devs who knew both or only one or the other and it was really disorganized. That might not be entirely React's fault, but it sure didn't help. But for the last four months I've been using Vue+Nuxt and I really really like it! I feel like the styleguide is well constructed and respected, the way you can easily seperate or integrate Template, logic and styles is impeccable and the state management and reactiveness is a lot less painful. There are obviously some weird quirks like in any framework/library, but overall I think Vue is a great framework and fits better with my coding style.

However, I do prefer Next.js over Nuxt. Next feels more mature and more powerful than Nuxt, but they are both great! :)

Collapse
djnitehawk profile image
Dĵ ΝιΓΞΗΛψΚ

SVELTE + TAILWINDS
is the holly grail of frontend ui for me 🙏

Collapse
areknawo profile image
Arek Nawo

I love my current monstrosity of a setup - Vue 3 + JSX + TypeScript. Vue 3 is awesome and the Composition API is just great. I love its inspiration source - React hooks - but I find Composition API even better.
From lesser-known options, I whole-heartedly recommend Solid. I love it for similar reasons - React hooks-inspired API, great TypeScript and JSX support, and crazy performance due to compiler-based architecture.
I've blogged about both of those, if anyone is interested and wants to dive deep.

Collapse
ryansolid profile image
Ryan Carniato

That's a very solid recommendation.

Collapse
aghost7 profile image
Jonathan Boudreau

Svelte would be the only framework out right now that I'd consider to really be something new. Other than that, flutter does support web app development.

Collapse
goldnead profile image
goldnead

As someone who loves vue it can sometime seem like an overkill for smaller projects. In those cases I go for Alpine.js because of its way smaller footprint but overall similarity to vue.

Collapse
menaiala profile image
Menai Ala Eddine

I'll learn Adonis.Js because it's a full-stack framework that will help me craft an MVP in a short time for the side projects.

I'll learn Electron because I want to be a cross-platform developer with one language Javascript.

I'll continue with Next.js because it's helpful for building Landing Pages with less effort and in a short time.

I've left Express because it's not maintained for a long time.

I've left Vue because my vision is to be React-specialist.

Collapse
mrblanchard profile image
Jeremy Blanchard

Like others have said, I'd say it's project dependent, and totally up to you what you're comfortable using.

That being said, I've just started a new Next.js project. They seem to be gaining steam lately. It sits on React (they call themselves a "React Framework for production"), so you kinda have to know React up front. Next.js makes tedious things in React much easier to do. Such as routing, deployment, etc.

I hear Vue is decent, but can't speak to that framework, yet.

Collapse
rdazvd profile image
Rafael de Azevedo

React is the elephant in the room at this point — and not by chance. It offers a great pattern for declaring UIs, has a decent developer experience, community resources are as abundant as grains of sand on the Earth, and the learning curve is as smooth as it gets IMO. Beyond all that, React has become a "platform" of sorts that serves as the UI piece of more sophisticated tools. It also serves pretty well as an easier entrance to application development targets other than the Web (thanks to the likes of React Native/Expo and Ink).

Besides React, another good one for this year is investigating buildless workflows and UI reusability through Web Component standards.

Collapse
adeleke5140 profile image
Kehinde Adeleke

I initially thought I wouldn't like or enjoy react but oh boy was I surprised. React is amazing and this is coming from someone who struggled with it initially for a month.

I'm still relatively new to react but I really like how JSX works and how it helps me implement all the JS concepts I had initially learned.

I've heard great things about Vue and it's simplicity but the team I wanna be part of uses React and I'd need it.

Collapse
wolfhoundjesse profile image
Jesse M. Holmes

If you're interested in working for the U.S. Government, I just finished interviewing with several companies, and most of my government first-touches were Angular and .Net related. Somehow I still landed a React position, though. lol

Collapse
tomaz_on profile image
Tomaz, Osvaldo Neto

I vote for svelte.js, I was going for vue until I met svelte :) where I work I can choose my tools, and I love Vanilla CSS (I'm a guy that I've chosen CSS Variables over SAAS), CSS GRID over Bootstrap, with svelte I not even need to install Babbel :) ; Seems like this svelte.js guy was made for guys like me XD ... Mainly because I've chosen with all heart C# / .NET 5 (razor pages) for high levels :) So for devs like me, svelte is the bigger winner here ... for those that is looking for get hired , I vote Vue.js (separate things) , React like I said , JSX not my thing , Angular is very complex thing full of things and more things (the JavaScript's bootstrap lol) ... So svelte.js for guys that can choose your tools and appreciate minimal things, have clients for modern browsers (Edge/Firefox/Chrome) (ES6 >> no requires to install babbel) , and Vue for those who wants to get hired xD

ps.: But the most important thing : "read about , feel the thing, somethings that do not work for me can work for you ... I have friend that really love JSX , and I have friend that love Angular ... Some people loves Bootstrap because comes with a lot of things, and some guys like me never will like. I love C# and I love ES6 , I really do, even with Blazor wasm have projects that will be interesting using it and projects that wil be interesting using vanilla.js/svelte.js ... In the end is always what do you want to do ?

Collapse
wkrueger profile image
Willian Krueger • Edited

DOnt try React before trying something else like Angular or Vue.

This way you can feel the sheer amount of traps that React has, or the problems that it refuses to solve, and are then delegated to 3rd party libs.

Collapse
shadowtime2000 profile image
shadowtime2000

I mean like it really depends. What type framework do you want?

Do you want a framework for frontend UIs, for creating videogames, for creating backend servers, or for creating CLIs.

When people thing of JS frameworks they always think of frontend UIs, but JS has a lot more usecases than just that.

Collapse
bracikaa profile image
Mehmed Duhovic

I'm stuck with Angular, and truth to be told I like the big, old boy. I know that React is the most popular one in the world right now, but how about other ones, any value in learning anything other than Angular/React (maybe Vue)?

Collapse
shaijut profile image
Shaiju T

Angular and React , Angular is used to build enterprise level apps.

Collapse
wolfhoundjesse profile image
Jesse M. Holmes

We used React to build an enterprise level app (or, in some instances, collection of apps), but I structured it the same way I structured Angular apps lol.

Collapse
faraazahmad profile image
Syed Faraaz Ahmad

I think it's about time frontend starts having the language options that backend does. Some people absolutely love JS and that's great. It's the first programming language I learned on my own (in high school), but sometimes people just want something else.

There needs to be a Bring-Your-Language frontend framework that compiles to webassembly

Collapse
cjpartridgeb profile image
Chris Partridge

Hopefully it's OK to include back end as well.

Moving towards utilizing TypeScript for all future projects, I've locked down the following for the foreseeable future:

NestJS + MikroORM (w/PostgreSQL) on the back end
React or Svelte + Tailwind on the front end

Hoping to do more with Svelte in the coming months, but we have a lot of React projects.

Collapse
baselakasha profile image
Basel Akasha
  1. Next.Js
Collapse
kalashin1 profile image
Kinanee Samson

Vue is cool, but react is the framework to learn in 2021, still boasts of the biggest community and jobs

Collapse
workingwebsites profile image
Lisa Armstrong

Agreed, but why?
There's very strong arguments for Vue, but React has the momentum.

What makes companies choose one over the other?

Will it change?

Comments welcome. 😊

Collapse
kalashin1 profile image
Kinanee Samson

I like vue a lot, it's simple to learn and easy to use. Untill the change is here, React is definitely the best framework to learn in 2021.

Collapse
adeviss2 profile image
Alain Deviss

Vue 3 all the way

Collapse
strzibny profile image
Josef Strzibny

Stimulus 2! :). Just quite simple with a few conventions.

Drawbacks: won't let you build a component design system.

Collapse
janmpeterka profile image
Jan Peterka (he/him)

As a heavily backend dev, I love Stimulus for just small sprinkles here and there, made in a readable and sensible way. Also, the Rails community behind it is just lovely.

Collapse
jadenconcord profile image
Jaden Concord

I plan to try out Hotwire sometime

Collapse
mzaini30 profile image
Zen

Svelte Kit 🎉🎉🎉

Collapse
givehug profile image
Vladimir Boretskyi

nothing please, spend a year learning/recapping how to engineer and build simple, secure and reliable software

Collapse
givehug profile image
Vladimir Boretskyi

or get into open source and fix the bugs in all those frameworks that you mentioned xD

Collapse
elixirprogrammer profile image
Anthony Gonzalez

VanillaJs

It really doesn't matter which framework, totally depends on what you are trying to accomplish. Whatever gets the job done or help you achieve your goal.

Collapse
atulcodex profile image
Atul Prajapati

I'm going with #react

Collapse
leewynne profile image
Lee Wynne

This is an awesome thread. If you are more right brained, then I am thinking Vue might be an easier path?

Collapse
jordanfinners profile image
Jordan Finneran

HTML & CSS! 😀

Collapse
daviddalbusco profile image
David Dal Busco

What about "learning to create your own framework"?

Could be quite cool too, especially if the learning is the goal 😉

Collapse
karthik2265 profile image
Karthik suryadevara

Hey developers, I want to use django for backend part of my app ,which javascript framework is best suited for the frontend part, for the app to work smoothly?