JSX stands for JavaScript XML. This is actually not a part of the core language but rather a syntax-extension.
You see, normal React is pretty hard to write. For instance, if you want to create an h1 element using core React code it will be something like this -
var template = React.createElement(
"h1",
null,
"Hello World"
);
However, JSX makes it simple to write it by doing so -
var template = <h1>Hello World</h1>
Pretty Cool isn't it. JSX allows you to write plain HTML into JavaScript and believe me when I am saying it makes life so much simpler.
Top comments (0)