DEV Community


Discussion on: Sh*tpost: can we stop saying "syntactic sugar"?

jorgecc profile image
Jorge Castro

The concept of virtual dom is cool. However, it is not really usable for every single application.

For example, let's say a classic web: HTML + JQuery. I draw the HTML (that is fast) then I call JQuery to modify the DOM. If the changes are minor, then modifying the DOM directly is quite fast, for example reading field of a form.

The alternative is to create a JSX and to use React to render the HTML (so the browser is doing an extra job). And, if we want to modify the dom, then we access the virtual dom. This virtual dom accesses to the dom, so we are adding a new layer again.

JSX shines when we need to modify intensively the DOM.