dustingetz / react-cursor

Immutable state for React.js
1.03k stars 50 forks source link

ImmutableOptimizations should respect react state #83

Open dustingetz opened 8 years ago

dustingetz commented 8 years ago

And document it better while we're at it. React ships PureRenderMixin which is not a very good mixin because it doesn't default to value comparisons for the rest of our props, leading to incorrectly skip render in common cases as documented.

ImmutableOptimizations is better because it lets us list things to ref-equals check, and everything else will value-equals check. We could also invert this which I dislike, because the simple cases - like passing a small record {id: 10, text: "hi"} - should work by default. Opt in to the optimizations.