The problem with using the DOM or similar UI frameworks is that you have to code the delta from any state to any state by hand.
This is exceedingly complex, error prone (because you might miss parts of the state that should change) and often slow (because you tend to overcorrect).