DEV Community

Discussion on: Why Virtual DOM?

Collapse
 
aidenybai profile image
Aiden Bai

I actually haven't heard of RE:DOM, but I just checked it out. It seems from (my very, very brief skim) that it provides a little bit of abstractions over what the DOM already is. Personally, I wouldn't call this declarative web programming, but I also probably do not understand this library enough.

Because it looks to seem like it only provides a minimal layer of abstractions, it's going to be fast - if you write basically native imperative DOM code, it's always going to be fast.

Regarding the todo example, there is a Hello World example in the README + docs, but no todo example. It will probably be easier to manage state in the libraries you mentioned than Million, but that's not the use case of Million. You can imagine Million as the "build target for a compiler." By itself, it's just a Virtual DOM, and other developers can build their own libraries, paradigms, concepts over it (with React, Vue, Svelte, other syntaxes)

Possibly once there is an ecosystem or libraries built around it, more todo examples will pop up and we can see something cool out of this. Thanks for the feedback!

Thread Thread
 
hasnaindev profile image
Muhammad Hasnain

Ooh, thanks for the clarification. I also looked into Lucia, it's a really fun tool. I love how I don't have to write any JavaScript and this 3 KB library can handle the reactivity. Honestly, you must be a genius. No doubt you will end up creating a tool that millions of us are going to use.

Thread Thread
 
aidenybai profile image
Aiden Bai

Haha, thanks for the compliment, I'm happy to help.