DEV Community

Discussion on: Explain JSX like I'm five.

Collapse
 
lexlohr profile image
Alex Lohr

JS is a language describing logic and interaction. HTML is a language describing content, based on XML, which is meant to describe arbitrary data.

JSX, a shorthand for JS+XML, is these two languages put together into one. In JS, you can use numbers, strings, etc, but HTML code would cause errors. In JSX, HTML Code becomes a valid value that represents the actual HTML.