← Back to context

Comment by buzzerbetrayed

16 days ago

> 100% pure JavaScript directly

How did the React community convince so many people of this falsehood? Do that many people just not know what javascript is? It baffles me that one could look at JSX and be like, “that right there is vanilla javascript”.

Yeah man it’s pure JS trust me just add this little transpiler and you’re good to go. What do you mean you don’t have a bundler?

History is important here. React came at a time when so many frameworks used custom template libraries for variable binding, looping, conditionals, etc. Usually it was some HTML/XML-like markup language.

vanila javascript would not be far off, just replace the tags with function calls. In early versions of react, there were people who wrote code like that. For some reason web devs since collectively agreed that the xml syntax is essential to web technologies

What people mean is obviously that you use JS primitives for looping, branching, conditionals, etc. over some DSL. Everybody knows that the tags are added syntax, there is no conspiracy here.

  • "These burgers are pure beef! Obviously what people mean is that beef is one of the ingredients. Everyone knows that the plastic is added in, there's no conspiracy here"

    • It's like arguing the moon and sun are the same size because they look the same size when looking at the sky. A hamburger with added plastic is essentially a hamburger. A hamburger made out of plastic that resembles beef is not.

      1 reply →