Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: 1kb virtual DOM - it's fast! (github.com/millionjs)
14 points by aidenyb on June 4, 2021 | hide | past | favorite | 12 comments



I like that it's readable and simple but it lacks some things that I usually need from a DOM layer like lifecycle methods/events and support for keying, SVG, shadow DOM. I think you are also going to run into some issues with browser extensions that inject elements, I had to fix that in my framework.


Really interesting - Skruv looks really cool! I think the use cases are slightly different, where million tries to just be a virtual dom that other libraries incorporate, skruv seems to be a JS library (correct me if I'm wrong).


Thanks! Yep, agreed, my point was more that things like shadow DOM, SVG and lifecyle events need to be integrated at the vDOM/DOM level to work, so a framework could not implement it on top of something like million currently. It'd be great if million could support such use-cases so that people like me didn't write their own DOM diffing/patching.


Ohh okay, that's a good point! Thank you


Very cool! Nice and slim, straight diff and apply. Cool to see someone use something other than `h` :P


thank you! we plan to add some more pinpoint updates for common updates to improve performance further (while staying under 1kb ;])


But is it "blazing" fast?


We're working on it . Currently it's extremely fast when compared to other vdom libraries but there's further edge cases we can cover to make it even faster


Probably should have added "/s" in the comment. It has become a little bit of a JavaScript meme.

Very cool project!


Oh i see LOL, thank you!


Is there a benchmark?


Yes, under the benchmark/ directory




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

Search: