Hacker News new | ask | show | jobs
by marcellus23 1701 days ago
yeah, I was thinking about this too as someone who's not super familiar with React — why isn't memoing the default behavior?
1 comments

I 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.