Hacker News new | ask | show | jobs
by HeyImAlex 1551 days ago
To expand on this, many of the things that hooks now make easy were bespoke per-class implementations with details that leaked into every lifecycle hook. Think of how you’d write a chain of useMemo calls in a class component to see just how bad it was.
1 comments

Why would you need useMemo in a class component? You can just attach a memoized instance of the function to the component