Hacker News new | ask | show | jobs
by strogonoff 321 days ago
I think one of the most awkward things about React (stemming from its virtue of being just a JavaScript library, as opposed to a framework with some custom DSL that could handle memoization behind the scenes) is that it has to be stated explicitly that non-primitive props should be memoized. React makes it way too easy to pass someProp={[1, 2, 3]}, yet to me it is always a caller’s bug.
1 comments

Hence react compiler
Does it automatically memo non-primitives?
IIRC that's the idea