re: Sh*tpost: can we stop saying "syntactic sugar"? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I didn't think about the performance tradeoff JSX might introduce. I don't have a huge understanding of React (attempted to learn twice while work...
 

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.

code of conduct - report abuse