Re:Immutable.js – Immutable Data Collections
by jonahx on Saturday November 01, 2014 @12:34PM
(#8543627)
Doesn't React already do efficient DOM updates for you with their virtual DOM and it's diffing mechanism? Or are you referring to something else?
[ Parent
| on HN ]
Re:Immutable.js – Immutable Data Collections
by WickyNilliams on Saturday November 01, 2014 @04:24PM
(#8544476)
React does minimise DOM mutation, but you can get even better performance by skipping the diff step completely (via the shouldComponentUpdate hook). With an immutable data structure this method can be implemented as simple reference comparison previousData !== nextData , so you can get absolutely best perf with ease.
Re:Immutable.js – Immutable Data Collections
by bendlas on Saturday November 01, 2014 @08:43PM
(#8545177)
I think he is talking about implementing .shouldComponentUpdate(), which is more efficient with immutable data, since you can compare identities (===). David Nolen made this point with Om's TodoMVC.