You might have heard of the Virtual DOM (and also the Shadow DOM). You may have even used it (JSX is basically sugar for the VDOM). If you want to ...
For further actions, you may consider blocking this person and/or reporting abuse
This is such a great article! I had trouble understanding the VDOM but you made it really clear and simple to follow. Looking forward to the next part! ✌️
Thanks! The next part might come out in 2 days
Hey, I enjoyed the article. I also agree with the points you raised. Thanks for the good content :).
Nevertheless, I just want to point some things out that I feel are minor issues in the article.
In the first snippet of code presented. The tests don't seem fair. For the object,
i
is being set every time, not appended to. However, forinnerHTML
,i
is being appended. This makes the measurement far slower. This is both because of layout thrashing, but also because the resulting string is huge (2,890 digits long). However, the main point still applies. When I tested just setting the valueinnerHTML
, it was about 20 times slower than the operation on the object.Also, the code snippet with the function
generateList
doesn't seem to work. I tried created sufficient HTML for it to run, but got a few errors.Anyway, I still enjoyed the article overall. Keep it up :).
I was just looking for a quick and easy way to show you stuff and I didn't actually take the time to test it too much. Thanks for pointing those out!
Yeah I gotcha. That's all good, as I said I still think it's a great article :). Yeah I was nitpicking a bit because I like actually running through the examples for more clarity :)
Me too, but not on my articles 😂
Very insightful! Waiting for the next part.
Thanks! The next part might come out in 2 days or maybe tomorrow
Look at these reactions, I am absolutely mind blown
("!".repeat(Number.MAX_SAFE_INTEGER))
(I could do that forever)
How do you like Svelte's aproach, avoiding it entirely? 👀
Yeah, Solid also uses build-time DOM diffing so we have at least two projects which prove it can be done. I think Virtual DOM did loads of good for the industry like popularised declarative UI development. However, if the runtime housekeeping like DOM diffing can be done at build-time, then I think it's no-brainer to consider these tools.
Good take 👍
I've never got the time to check it out, but I will in the (I hope) near future.
Update: WOW! Svelte has got a really good idea.
Great article!
Performance is important. Thank you.
The second part is out! (Was out earlier but I forgot to make it a series 😅)