There are a few questions you need to ask yourself when choosing a package:
You basically need to ask yourself: “Is this author credible?”. Most of the packages are community maintained, meaning some hobbyist decided to publish a solution to a problem he/she has had. You can tell if the community takes a liking to a packages when there are a lot of independent contributors, but at the same time you are running into a possibility that they abandon the project if something better comes along. On the other side of the spectrum, you would think that big companies should create packages that are maintained, well documented and reliable, but that isn’t always the case. There are excellent packages which are open source and maintained by both the company and the community, while some are maintained only by the company who created it. An example of what not to use is react-beautiful-dnd which is developed by Attlassian, who have a reputation of creating non-performant, non-maintained packages, which you should almost always avoid if you can.
When was the last change made?
This should be one of the biggest indicators if you should use this package. If no changes have been made for a couple months, that’s already alarming. If no changes have been made for more than half a year, that package is probably dead and you shouldn’t use it. Although this is a rule of thumb it doesn’t have to be for all packages, some just don’t need to change often and/or you may have no other choice (unless you build it yourself).
how big is it’s file size compared to similar packages?
With the ever-growing need for more features, better UI etc. your application will pretty soon get very heavy (have lots of dependancies), which then impacts performance. That is why another big factor is package size. For example, when comparing React libraries for creating charts, react-chartjs-2 has 54.9 KB vs recharts which has 5.04 MB. That’s a pretty big difference if you ask me.
what do the docs look like?
Check out the documentation. Does it exist? If not, that should be a big red flag because it will take a lot of time just to understand how it works. Not to mention what happens if you run into bugs, caveats etc. In React-land for example, how is the API structured, how do you use it? Do they use a modern, flexible API or something older (like classes)?
Are there any active discussions ABOUT IT ON github/ Community forums/ stackoverflow?
A reliable indicator for a good package is the amount of discussions, questions and issues being added and resolved. It shows that lots of people are actively using and improving it. Not to mention, you are probably going to have to google problems you run into, and it’s good to know you’ll most likely be able to find the solution.
what are the npm trends for it?
Although it’s not the most relevant information, looking at the number of downloads and comparing them with similar packages can give you an indication at what other developers are using the most. On sites like https://npmtrends.com/ you can compare different packages and see the average/daily/monthly/yearly downloads.
It should be noted that you should take into consideration all of these question, however, you do not need to fulfill all of them, nor do you need to stick to them 100%. Sometimes you will not have a choice but to use some package regardless (unless you make it yourself).
And now without further ado, here are our recommended packages!