4 ms·
yeah, I was thinking about this too as someone who's not super familiar with React — why isn't memoing the default behavior?
by marcellus23 5y ago
yeah, I was thinking about this too as someone who's not super familiar with React — why isn't memoing the default behavior?
- Zababa 5y agoI think that's because everyone needs to debug their React app, but not everyone needs the performance. So you optimise for the most common use case, where you make debugging easier. Memoization is a form of caching, caching is hard. Most backend web frameworks don't come with a cache by default, you add one when you need the performance. It's the same here.