React hooks have a serious duplication problem
https://nikgraf.github.io/react-hooks -> filter by "online" or just google for any network status hooks.
They nearly all have this exact structure, a copy-paste job from a tut...
This is an incomplete online check (having network !== being online) and I've just wasted 20 minutes of my time browsing the code of different hooks and hook-libraries looking for one that does a better check than the offline/online events. It's astounding to me that I can easily find 10 that are just the same code with different variable names.
It's also striking that many published hooks have barely any or just no documentation, especially in the libraries that have a bunch. How are you supposed to evaluate that this actually solves your specific problem?
Why is this happening? This seems very bad for the ecosystem.
Posted Oct 8, 2019, 7:45 AM UTC
Open ecosystem in a nut shell. Just stick to any famous library or make a custom hook that suite your need by yourself.