How To Choose Which JavaScript Libraries To Use (Part 1)

So you want to create a JavaScript project? Great! Which library or framework are you going to use, React? Maybe Vue.js? Maybe you prefer using just Vanilla JS? Heck, even jQuery might be an option!

OK, let’s say you choose React. Now, how will you do…


This content originally appeared on DEV Community and was authored by DEV Community

So you want to create a JavaScript project? Great! Which library or framework are you going to use, React? Maybe Vue.js? Maybe you prefer using just Vanilla JS? Heck, even jQuery might be an option!

OK, let's say you choose React. Now, how will you do the state management? Redux, maybe MobX? Or maybe I rely just on React Hooks and the Context API?

Choosing the right tools is one of the most important decisions that you'll have to make when you start a new JavaScript project. These decisions have long-term consequences, good and bad, for your project. And they play a crucial role in the success (or failure) of it.

In this four-article series, I'll give you my tips and tactics so you can choose the best libraries for your JS project.

Take Into Account Project Size

In smaller projects, you should prefer tiny libraries (or even Vanilla JS) with little boilerplate code. On the other hand, larger, more complex libraries are better suited for larger projects that might be worked on by many people.

One of the advantages of (some) complex libraries is that make the code easier to maintain (if you use them properly, of course.) at the cost of more boilerplate code, increased build times, and larger bundle sizes.

However, small codebases are easier to maintain. That means, if you add complex tools you'll get the disadvantages, but not the benefits (because you already had the benefit of maintainability.)

It doesn't necessarily mean that you should use only larger frameworks and libraries on big projects. Size still matters and if you find a smaller library that does the same thing and does it well, it can be a good option, as long as they meet the other requirements in this series.

In the next article of this series, I'll talk about comparing new and shiny libraries vs. popular and "safer" ones, and when to choose one over the other.

p.s. Did you like what you've read? Every week I send an email with free tips and insights to become a better JavaScript dev. If you're interested, click here to subscribe.


This content originally appeared on DEV Community and was authored by DEV Community


Print Share Comment Cite Upload Translate Updates
APA

DEV Community | Sciencx (2021-04-21T20:54:11+00:00) How To Choose Which JavaScript Libraries To Use (Part 1). Retrieved from https://www.scien.cx/2021/04/21/how-to-choose-which-javascript-libraries-to-use-part-1/

MLA
" » How To Choose Which JavaScript Libraries To Use (Part 1)." DEV Community | Sciencx - Wednesday April 21, 2021, https://www.scien.cx/2021/04/21/how-to-choose-which-javascript-libraries-to-use-part-1/
HARVARD
DEV Community | Sciencx Wednesday April 21, 2021 » How To Choose Which JavaScript Libraries To Use (Part 1)., viewed ,<https://www.scien.cx/2021/04/21/how-to-choose-which-javascript-libraries-to-use-part-1/>
VANCOUVER
DEV Community | Sciencx - » How To Choose Which JavaScript Libraries To Use (Part 1). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/04/21/how-to-choose-which-javascript-libraries-to-use-part-1/
CHICAGO
" » How To Choose Which JavaScript Libraries To Use (Part 1)." DEV Community | Sciencx - Accessed . https://www.scien.cx/2021/04/21/how-to-choose-which-javascript-libraries-to-use-part-1/
IEEE
" » How To Choose Which JavaScript Libraries To Use (Part 1)." DEV Community | Sciencx [Online]. Available: https://www.scien.cx/2021/04/21/how-to-choose-which-javascript-libraries-to-use-part-1/. [Accessed: ]
rf:citation
» How To Choose Which JavaScript Libraries To Use (Part 1) | DEV Community | Sciencx | https://www.scien.cx/2021/04/21/how-to-choose-which-javascript-libraries-to-use-part-1/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.