Tobias Uhlig
1 min readJul 12, 2024

--

As promised, here it the quick update that the algorithm can now support the exclusion of nodes / sub-trees which are flagged as static:

https://github.com/neomjs/neo/issues/5559

I will update the gist too, to add a couple lines of code.

One question which popped up on social media was regarding the interface of a VNode. It is described here:

https://github.com/neomjs/neo/blob/dev/src/vdom/VNode.mjs

Another question was what NeoArray.remove() & insert() could be. It felt so trivial that I did not mention it, but to resolve it: just a tiny wrapper for Array.splice() which checks if an item exists first. Implementation: https://github.com/neomjs/neo/blob/dev/src/util/Array.mjs#L126

To be clear: this unique & well balanced way to get a list of transformation actions to transform any kind of DOM tree into another is NOT tied to the neo framework. It could easily get used in other frameworks, component libraries or frontend implementations which are in need for highly efficient & predictable DOM updates.

--

--

No responses yet