4 ms·
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
by HeyImAlex 5y 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.
- mb7733 5y agoWhy would you need useMemo in a class component? You can just attach a memoized instance of the function to the component