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

Try making a web app rerenders the DOM on any state change, it will be extremely slow--the browser doesn't diff. :) That's why vDOM & diffing is necessary. Also so UI inputs don't lose focus / selection state / etc.



State change, eh? There's this, which diffs only local updates and doesn't use a vDOM: http://simulacra.js.org/

Disclosure: I'm the author.


Tracking changes to application state & translating to DOM changes is nothing new, [1] it's what Angular, Angular2, Riot, Knockout all do, and doomed to efficiently translating any complex state changes. [2] Not only that, feeding application state in from an API will cause the all the dependent UI to completely rerender.

[1] https://github.com/sapeien/simulacra/blob/master/lib/bind_ke... [2] https://news.ycombinator.com/item?id=12757722


You don't need vDOM/diffing for many types of applications. Your CRUD app doesn't need to update at 60 FPS.


Diffing is an implementation detail. Imperatively updating might still be needed to hit that 60 FPS ;D

Personally, I lean toward server side web apps ATM--users are familiar with page reloads, and developers are familiar with building them.

This is changing--users want faster UX, designers want fancier UI, PMs want cross platform apps. These external wants have developers creating & familiarizing with simpler ways to achieve them.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: