Hacker News new | ask | show | jobs
by danabramov 2678 days ago
I don’t think we promote isolating every little thing. That would indeed be counterproductive.

It’s more about being able to reuse some stateful logic between components. That’s the point of custom Hooks. There are pretty cool libraries existing already. For example React Spring takes advantage of that programming model for animations: https://www.react-spring.io/docs/hooks/use-spring

I tried to explain the motivation for Hooks here:

https://medium.com/@dan_abramov/making-sense-of-react-hooks-...

Hope it helps.