Hacker News new | ask | show | jobs
by jefb 1389 days ago
Hooks are obviously not stateless - I'm saying they were an inevitable consequence of the push towards functional components and that they represent an inferior development experience. No one needed to write 2000 words on how to use setState.
1 comments

Couldn't disagree more. Do you remember all the nonsense you had to read about componentWillUpdate, componentDidUpdate, getDerivedStateFromProps, componentWillMount, componentWillUnmount? What a mess. Hooks clean up so much of that complexity.
Maybe this has more to do with how people look at these paradigms. I find the class based lifecycle methods much easier to wrap my head around than hooks. I think hooks are more of an answer to higher order components. They make sense to me when I look at them that way, but as a replacement for classes, function components seem inferior from a maintainability perspective.