News for hackers. Stuff that matters.
Re:A Critique of React Hooks by exogen on Monday April 27, 2020 @12:19PM (#22997247)
The problem before was that your class component was not updating correctly and rendering stale & out of sync data. If it were updating correctly, it would have had the same infinite loop problems.
Re:A Critique of React Hooks by ng12 on Monday April 27, 2020 @12:33PM (#22997378)
Exactly this. Class components let you cheat and easily write components that were broken if a prop was unexpectedly updated. Hooks will surface this immediately.