VDom is one of those things that is way way less complicated than people assume it is. I’m doing some frontend stuff using Go compiled to WASM, and started working on my own implementation:
…there are a couple things not implemented, and I should like, document it – but I don’t anticipate it getting wildly larger than the < 400 lines of code it is now.
Exactly, yeah - I think the name is a bit scary, “virtual dom”. It sounds more complicated than it is. All it really is is diffing two ASTs and applying patches.
VDom is one of those things that is way way less complicated than people assume it is. I’m doing some frontend stuff using Go compiled to WASM, and started working on my own implementation:
https://github.com/zenhack/go-vdom
…there are a couple things not implemented, and I should like, document it – but I don’t anticipate it getting wildly larger than the < 400 lines of code it is now.
Exactly, yeah - I think the name is a bit scary, “virtual dom”. It sounds more complicated than it is. All it really is is diffing two ASTs and applying patches.
The interesting part of this is in the Github pull request, which shows how to implement the elm architecture with a virtual-dom: https://github.com/eeue56/make-your-own-tea/pull/1