Live data from Hacker News

React's DOM Diff Algorithm

facebook.github.io

1–2 of 2 posts

Re: React's DOM Diff Algorithm

#2
I wrote a very simple DOM diff'er a while ago in Ruby for a somewhat similar usage (diff'ing the same pages over and over with probably a small number of changes each time) https://github.com/conorh/rdomdiff. It works in a similar way to their diff, although definitely not as well as theirs works - for my needs I was able to ignore sibling nodes moving around. I made the tradeoff that once I hit enough changes I would stop the diff and treat the page as a completely new change.