DEV Community

Cover image for Sloan's Inbox: How and when to choose a JavaScript Framework?
Sloan the DEV Moderator for The DEV Team

Posted on

Sloan's Inbox: How and when to choose a JavaScript Framework?

Hello! Sloan, DEV Moderator and resident mascot, back with another question submitted by a DEV community member. šŸ¦„

For those unfamiliar with the series, this is another installment of Sloan's Inbox. You all send in your questions, I ask them on your behalf anonymously, and the community leaves comments to offer advice. Whether it's career development, office politics, industry trends, or improving technical skills, we cover all sorts of topics here. If you want to send in a question or talking point to be shared anonymously via Sloan, that'd be great; just scroll down to the bottom of the post for details on how.

Let's see what we got...

Today's question is:

I'm just getting started with JavaScript and have realized that there are quite a few frameworks out there... how do you choose one? Is it best for me to try and learn vanilla JS to start off or am I fine to move on to frameworks early on?

Share your thoughts and let's help a fellow DEV member out! Remember to keep kind and stay classy. šŸ’š


Want to submit a question for discussion or ask for advice?Ā Visit Sloan's Inbox! You can choose to remain anonymous.

Top comments (3)

Collapse
 
nombrekeff profile image
Keff • Edited

Well, it's always recommended to learn a language before using a framework. But it depends on why you want to learn a framework. If it's for your own learning, I'd recommend learning the vanilla language first, as this will then help you when you switch to using a framework. If the reason is for a project or for work, then you might want to pick up a framework.

The reasons why learning the language first is better are that, without that knowledge, frameworks can feel very complex and difficult to reason about, and you will not be able to take full advantage of them. Of course, if you learn a framework you will also learn the language, but it'll be harder I think.

What framework to choose can be very hard or very easy depending on the reason you need it. If you need to create a super complex app, you might need something like React, Angular, etc... If you don't need your app to be so complex, you could opt for something like VueJS or Svelte (they can also make powerful apps, but are a lot simpler to start using). So yeah, I can't tell you what framework to use but know that most of them end up doing the same things.

Collapse
 
thecheapaudiophile profile image
Griff Polk

Honestly, Please, please PLEASE learn Vanilla JS before learning any frameworks. This will make not just the first framework you want to learn easier to learn, but all future JS frameworks. This is short but sweet, but PLEASE do so. Thanks. Youā€™ll notice a huge improvement in the quality of your work.

Collapse
 
theaccordance profile image
Joe Mainwaring

I'm just getting started with JavaScript and have realized that there are quite a few frameworks out there... how do you choose one?

There are a variety of different perspectives you can apply to a framework evaluation to arrive at a conclusion. I myself prefer Angular as I find it a more elegant solution compared to some others, but I can't deny the popularity of React.

As far as my advice to you for picking a framework, you have two options:

  1. Embrace the popular one (React) which gives you the most opportunities to leverage
  2. Let the requirements of the project or team decide for you.

Also - don't be worried that you can pick the wrong framework. You can always refactor later to a different framework, plus the skillset you learn with any framework will help you learn others.

Is it best for me to try and learn vanilla JS to start off or am I fine to move on to frameworks early on?

You do need to know some basic JavaScript to be successful with any framework, but you don't need to master vanilla JS to get started with frameworks. However, I would strongly encourage you to work towards mastery once you've built up an intermediate skill working on JS projects, as it will help you fine-tune your code for performance and scale.