Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide option to view "Dependents" instead of "Downloads" #170

Open
cseas opened this issue Feb 4, 2023 · 0 comments
Open

Provide option to view "Dependents" instead of "Downloads" #170

cseas opened this issue Feb 4, 2023 · 0 comments

Comments

@cseas
Copy link

cseas commented Feb 4, 2023

Problem

NPM downloads are often not the best way of comparing the usage of two libraries since downloads are easily inflated by CI. Svelte suddenly crossing React in NPM downloads is one of the best examples of this.

Let's look at another example.

If we check the stats of Next.js vs Create React App on npm trends, we can see that next recently crossed react-scripts in the number of downloads.

Screenshot 2023-02-04 at 1 56 09 PM

But does this mean that given a random React project, it's almost equally likely to have been built with Next.js or Create React App? Probably not. Because if we visit the npm pages of these packages, we see this:

next react-scripts
Screenshot 2023-02-04 at 2 03 39 PM Screenshot 2023-02-04 at 2 04 15 PM

react-scripts has more than 5x dependents compared to next. Now I understand that for this particular example, it might be arguable that these libraries aren't really used to build npm packages that show up as dependents.

But consider the use-case if we did want to compare two libraries that are used to build other libraries. So for example, if we want to compare how many UI libraries are built with styled-components vs @stitches/react, now the number of Dependents becomes a significantly better measure of comparison than number of downloads.

Suggestion

It'd be great if we had an option to select between Downloads or Dependents just like we can select the time period.

Screenshot 2023-02-04 at 2 08 55 PM

Alternatively, Dependents can be added under the Stats table that shows up below the generated chart. However, most people just look at the chart. I personally didn't even realise the Stats table was there until I scrolled down today to check whether there was a direct npm link to the libraries somewhere on the page. It'd be nice to be more explicit that Dependents is also a fair measure of comparison by providing it as an alternative to Downloads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant