News for hackers. Stuff that matters.
Re:Understanding UseMemo and UseCallback by johnfn on Tuesday August 30, 2022 @08:55PM (#32657093)
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.
Re:Understanding UseMemo and UseCallback by bezier-curve on Wednesday August 31, 2022 @04:10AM (#32659626)
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.