News for hackers. Stuff that matters.
Re:A Critique of React Hooks by jiofih on Monday April 27, 2020 @12:56PM (#22997594)
That would be trivial to spot. Not the case with hooks.
Re:A Critique of React Hooks by torartc on Monday April 27, 2020 @08:04PM (#23001758)
It's trivial to spot with hooks.
Re:A Critique of React Hooks by charrondev on Monday April 27, 2020 @10:04PM (#23002572)
This is definitely not the case. I’ve seen enough class components with complicated componentDidUpdate methods. The method would then be broken up into multiple other smaller methods (or to re-use some logic in didMount and didUpdate)

A few iterations later and you have setState peppered throughout your component.

More often then not though I’ve seen a lot of class components that would just fail to update when certain props change. It’s much harder to miss these cases with hooks.