What does HackerNews think of morphdom?
Fast and lightweight DOM diffing/patching (no virtual DOM needed)
Previously have seen: https://github.com/patrick-steele-idem/morphdom
I have been working on a new DOM-morphing algorithm for htmx. It is based on the standard morphdom algorithm[1], but uses ID sets to offer better DOM stability with fewer explicit IDs.
There is a demo gif near the bottom that shows how idiomorph can keep the DOM stable in places that morphdom cannot.
The algorithm is still extremely new, so I'm sure there are plenty of bugs and corner cases, but I thought people outside of the htmx world might be interested in the project.
also, StimulusReflex predates Hotwire for 1 year and is already pretty hardened :-)
I am not sure this is even correct. Firstly, the famous js framework benchmarks (https://github.com/krausest/js-framework-benchmark) based on adding/removing list items used to have vanilla JS as an unbeatable winner, despite its direct manipulation of the DOM, and React was definitely significantly behind. Secondly, as the README for morphdom says, the real DOM is very fast (https://github.com/patrick-steele-idem/morphdom). If I remember correctly, virtual DOM was supposed to solve the particular performance problem where you would otherwise just throw huge chunks of DOM away rerendering them anew every time your app state changed. But this is a very special (although brilliant) approach to keeping your UI in sync with your app state; you wouldn't necessarily do so if you wrote your app with vanilla JS.
It diff's the DOM instead of a VDOM