DEV Community

Sebastian Messier
Sebastian Messier

Posted on • Updated on • Originally published at webdevwithseb.com

How to pick the best NPM packages

Picking the best NPM package is no easy task; there are always too many options to choose form:

  • React vs Next vs Vue vs Angular vs Svelte vs …
  • Express vs Koa vs Fastify vs Nest vs …
  • Sequelize vs Prisma vs TypeORM vs Knex vs …

At the end of the day, all we want is to avoid wasting our precious time learning an obsolete package.

I’m going to share 2 tips to help you pick the best NPM packages for your projects every single time.

Tip #1: Stick to What’s Popular

Choosing popular packages is a very smart move in the NPM ecosystem. Doing so has three powerful outcomes:

  • Minimizes the risk of learning an obsolete / dead package
  • More opportunities for employment / freelance
  • Larger ecosystem of plugins / extensions to build on


I’m joking. Angular is a mighty fine framework.

My favorite way to measure adoption of a framework is to search it on Openbase.

Openbase lets you compare NPM packages. You can browse their weekly downloads, Github stars, active contributors, and reviews.

Tip #2: Stay Within Your Circle of Competence

In a world where shiny object syndrome runs rampant, avoiding the magnetic pull of hype is a superpower. Instead, stay within your circle of competence by using familiar packages.

This is helpful for a couple of reasons:

In doing so you avoid the cost of learning a new package. If you stick to what you know, you wont have to scan documentation or watch tutorials.

This keeps you productive & eases the burden of shipping a project.

A good way to stay within your circle of competence is to browse related tools to those you use every day.

When in doubt, pick packages that build upon your existing knowledge. You’ll rarely regret it.

Conclusion

The NPM ecosystem is an ever-evolving beast. New packages come and go on a monthly basis. This makes picking the right NPM packages hard, when it doesn’t have to be.

The best JS developers defer to picking what’s popular, and staying within their circle of competence.

If you stick to these two principles you’ll decrease the learning curve of new libraries and frameworks. You will be working smarter, not harder, and your knowledge will compound.

Do this long enough, and you’ll pick the best NPM packages for your next project every single time.

Want more web dev tips?

Follow me on twitter and subscribe to my web dev newsletter.


The post How to pick the best NPM packages first appeared on 💻 Web Dev With Seb.

Top comments (2)

Collapse
 
liorgrossman profile image
Lior Grossman

Thanks for the great article and the mention of Openbase!

Collapse
 
techtitans0101 profile image
TechTitans0101

Open source is essential for application developers. It is unfortunate that Open Base is shutting down. If you are looking for an alternative, check out kandi from Open Weaver. kandi helps developers build applications faster through open source reuse. Through its natural language interface, kandi recommends code snippets, packages, libraries and solutions from 650 Million open source assets. kandi also promotes responsible reuse with proper license attribution across all assets, while guiding the developer on paring code snippets with libraries to build their applications faster.

Try kandi at kandi.openweaver.com. Thank you for your support to the open source community and happy coding!