Introduction to JSX
We have been using JSX so far, but what does it mean? JSX stands for JavaScript extension. How can it be an extension?
As you probably know, ECMAScript is also an extension to JavaScript (kind of). ECMAScript transpiles to JavaScript. What does this mean? It means that it just transforms ECMAScript code into valid JavaScript code. JavaScript misses out on many features that we like from ECMAScript, such as arrow functions, classes, and destructuring operators.
JSX works the same way. JSX is being transpiled to JavaScript, and its main feature is creating React elements based on the markup you write. Could we use only JavaScript? Yes. Is it worth it? Most likely not.
Let's check this out in action. This is JSX and ECMAScript: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access