Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This sounds very similar to http://google.github.io/incremental-dom/#about (esp skipping the virtual part).

Can anyone point out any notable differences?



Here's the notable differences based on my understanding after looking over the docs and the source code:

- morphdom does diffing between two real DOM trees while incremental-dom does diffing between virtual DOM nodes and real DOM nodes - incremental-dom is only meant to be used with templates that compile to use incremental-dom (won't work with templates that render to HTML strings) - morphdom can be used with any templating engine that produces an HTML string (or real DOM nodes) - With additional improvements, morphdom could be used to do diffing between a real DOM tree and a virtual DOM tree as long as the virtual DOM nodes are upgraded to real DOM nodes if they need to be added to the final real DOM. In addition, the virtual DOM nodes would need to have an API that overlaps with the API of real DOM nodes.

Also, it appears that incremental-dom doesn't reuse DOM nodes that move to a new parent, but I could be mistaken. Hopefully someone more familiar with incremental-dom will chime in.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: