News for hackers. Stuff that matters.
Re:How does one build large front end apps without using a f... by throwthrow0987 on Friday October 17, 2025 @12:19PM (#45618497)
I preferred class based components. The pretend functional programming style of hooks is quite imperative when you prick a little beneath the surface, so classes were probably the right abstraction.
Re:How does one build large front end apps without using a f... by collingreen on Friday October 17, 2025 @03:30PM (#45620996)
The problem with classes that hooks helped with was how hard it was to add multiple, reusable bits of lifecycle functionality. In even a medium size codebase I'd find myself having to reason about how to combine behavior A with behavior B in the onComponentWillWhatever methods. Hooks are weird but much much easier to compose and share.