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
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
This is helpful for a couple of reasons:
- Keeps you productive
- Raises the odds of success
- Builds upon your existing knowledge
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.
- If you know Vue → check out Nuxt
- If you know React → check out Preact
- If you know Postgres → check out Supabase
When in doubt, pick packages that build upon your existing knowledge. You'll rarely regret it.
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.