Hacker News new | ask | show | jobs
by cdeutsch 1490 days ago
Exactly my impression after reading the article.

I've been saying it since it came out, React Hooks was a HUGE mistake. It fractured the ecosystem into two completely different ways to use React.

Personally I find Hooks code much harder to comprehend. And this article is a perfect example of why even simple looking Hooks code comes with unintuitive behavior.

Someone needs to fork React, remove Hooks, and merge `componentDidUpdate` and `componentDidMount` into one function with a flag to determine if it's "on mount", so I don't have to keep calling `componentDidUpdate` from `componentDidMount`.

I've been using React at work for 8 years straight FWIW, and can't wait to use something else. I'd be happier using jQuery at this point

1 comments

Does Vue offer relief from React's continuous accretion of hooks? The big point of confusion for me with React, as the number of hooks just keeps on increasing, is how do I hold in my head all the ways these hooks can interact with each other? And don't get me started on that array as the second arg to useEffect. Maybe Redux is just generally a better approach to developing with React at this point in time.