Categories
JS npm

How to pick the best NPM packages

Picking the best NPM package is no easy task. In this post I’ll share 2 tips to help you pick the best NPM packages for your project.

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 newsletter.

Leave a Reply

Your email address will not be published. Required fields are marked *