3 ms·
I don't really see much of a difference - that is still storing it as a text attribute inside a DOM node. To be clear, I vastly prefer Reacts approach of putti
by zkldi 5y ago
I don't really see much of a difference - that is still storing it as a text attribute inside a DOM node.
To be clear, I vastly prefer Reacts approach of putting HTML into JS, rather than Vue/Angulars approach of putting JS into HTML.
- likeclockwork 5y agoIt never ends up on a DOM node. The template is compiled into a render function.
- EugeneOZ 5y agoYou are trying to discuss things you have never tried in practice, just saw some examples in the docs. Your opponents are trying to explain this fact politely.
- lenkite 5y agoYeah well, its not really HTML - its JSX and it reads quite differently. Most folks who create HTML prefer to read HTML not Reacts domain language. HTML is a documented world-wide standard implemented by web-browsers. JSX is not.
- cout 5y agoThis has been the debate of templating systems for as long as I can remember. Do you want your looping construct to use the same syntax as your markup language (so all the tools you use that operate on the markup "just work", without any modifications)? Or do you want to use the same looping constructs as the language you are programming in (so there's no need to invent or learn a DSL built on top of a markup language)? Both approaches are valid, and each comes with its own set of tradeoffs.