
Use Hooks – A Collection of Reusable React Hooks - int64ago
https://use-hooks.org/
======
duncan-donuts
I’m having a hard time understanding what problems this (and hooks in general)
really solve. Why should I use the axios hooks over just using axios directly?

~~~
pavlov
Many front-end developers keep building the same thing over and over again
with minor variations. To make the work feel more meaningful, it’s regularly
reprojected onto a new pattern. Then you can go give a conference talk about
“I did old thing X using new thing Y” and get away from the office for a day.

~~~
m0meni
Seems like you just have an axe to grind. Hooks solve a lot of problems, and
being ignorant to that doesn't make them useless :)

------
m0meni
This is just...a mostly empty landing page?

I like [https://www.hooks.guide/](https://www.hooks.guide/) way more as it
provides both usage + implementation of many different hooks from the
community.

~~~
int64ago
The [https://www.hooks.guide/](https://www.hooks.guide/) looks nice :-)

[https://use-hooks.org/](https://use-hooks.org/) is actually an entry of
GitHub Organization [https://github.com/use-hooks](https://github.com/use-
hooks), it aims for creating custom hooks easily and putting in one place.

------
ctulek
Hooks are interesting. We are reading about it and evaluating it.

However, I have a hard time in understanding why I should use all these tiny
‘use’ libraries? Hooks are already simple to implement such small snippets
yourself in your codebase.

~~~
int64ago
Because it's reusable, you can apply it in more projects than one.

In another way, if a Hooks includes business logic, then it should be put in
your project.

~~~
ctulek
I disagree. That something is reusable is not enough for it to become a
library. There should be other benefits, because, using an external library
has its own drawbacks.

~~~
exogen
As someone who works for a popular consultancy that helps out developers at
big companies and reviews their code: ANY library you can point people to and
say "do it this way" is an absolute godsend.

You really do not want large numbers of developers, with varying levels of
experience, trying to figure out how to do something that has already been
solved, and making the same avoidable mistakes in the process – unless you are
deliberately trying to teach them something at that moment (whereas most of
the time they are just trying to get things done on a tight schedule).

The job of a developer is only _secondarily_ to write code. The primary job is
to fulfill the actual real-world needs of their business or organization.
Customers don't want code, they just want their needs met. Unfortunately
sometimes this involves barfing out a lot of code – which is more likely a
liability, not an asset to the company. The more new code we can avoid
bringing into the world, the better.

~~~
ctulek
I agree that “do it this way” can be godsend. However, suggesting a library is
only one of the ways. By suggesting all these tiny libraries, I don’t think we
will mentor the less experienced community in the right direction.

------
dfee
I’d like to see hooks in CRA but that’s apparently a CRA3.0 thing - far off in
the future.

~~~
ng12
Spend an afternoon learning webpack, eject, and never look back :)

~~~
jakelazaroff
Ha, I went the exact opposite way — when I found out about CRA I was relieved
to never have to deal with another webpack config :)

------
antibland
Quick aside about Dan Abramov. The guy is like Superman when it comes to
answering React questions and untangling tricky misconceptions. He shows up at
the right time, on HN, Reddit, Medium, and random blog posts His dedication to
React, the library, and the web community at large, is staggering to me. Thank
you!

