DEV Community

Discussion on: NPM libraries: which are the good ones?

Collapse
 
oguimbal profile image
Olivier Guimbal • Edited

If your main choices have already been taken care of (framework, ui lib, ...), i think you're asking the wrong question.

When you're starting to write a new feature, ask yourself:

1) Is this feature domain specific ? (yes ? then do it yourself)
2) Is there any chance that someone might already have done it ? (no ? then do it yourself)
3) Is it really worth it to use someone else code for that, or would I be happier with something I wrote ? (no ? then do it your self)

If you've passed those steps, there is a good chance that there is a lib that suits your needs.

There are literally no way to tell in advance which one will be usefull to you. Nor to know all of them. I can give you some advice to chose them, though:

  • Do not pay attentions to repo⭐ too much or download counts, they dont mean much (especially on recent libs, or on edge features)
  • Avoid libraries that have no activity (not been modified for years, no question asked, ...)
  • Check if there are issues. If there are, and there is nobody answering them, nor any commits showing some sign of authors activity, then the lib is likely dying.
  • Avoid using libs big libs that that are doing too much if you only plan to use a tiny portion of them (it could increase your bundle size signifcantly if they're not tree-shakeable)

That said, I know the best lib out there: mine πŸ˜„ (shouldnt be of much use for the frontend, though)

Collapse
 
jmfayard profile image
Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard

That's super helpful, thanks a lot!