3 ms·
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
by strogonoff 1y 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.
- olejorgenb 1y agoHence react compiler
- strogonoff 1y agoDoes it automatically memo non-primitives?
- olejorgenb 1y agoIIRC that's the idea