3 ms·
I have started using this with our React.js project and have been able to squeeze out efficient DOM updates comparable to Om. For fun I also made a library tha
by zbyte64 12y ago
I have started using this with our React.js project and have been able to squeeze out efficient DOM updates comparable to Om.
For fun I also made a library that overloads Immutable.js and JSON operations (and can do the same for mori):
https://github.com/zbyte64/dunderdash https://github.com/zbyte64/dunderdash
- jonahx 12y agoDoesn'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?
- WickyNilliams 12y agoReact 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.
- bendlas 12y agoI 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.