top | item 41347353

(no title)

eeue56 | 1 year ago

Nice! I did a similar project, more focused on creating an Elm architecture framework in TypeScript here[1]). I based it on implementing virtual-dom logic for both Elm codebases and Derw's renderer. Since it's a decent amount of code, I couldn't find a good way to represent it in a blog post, and ended up making a commit-by-commit example on Github instead. Since it's FP-focused, it doesn't support useEffect/useState like this post, but rather has an external subscription/message system instead.

It does support server-side-rendering, hydratation, and async events. It's a bit different in implementation in the OP's post, but I think the most important thing any reader should take away is that at the core, virtual-doms can be quite simple with plenty of room for further optimization.

[1] - https://github.com/eeue56/make-your-own-tea/pull/1

discuss

order

robpruzan|1 year ago

Just went through each commit- this is an extremely engaging way to document a project, nice work

LoganDark|1 year ago

Woah, you are so right. I should try this out sometime