DEV Community

Visakh Vijayan
Visakh Vijayan

Posted on

3

What is the big deal with JSX

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"
);

Enter fullscreen mode Exit fullscreen mode

However, JSX makes it simple to write it by doing so -

var template = <h1>Hello World</h1>

Enter fullscreen mode Exit fullscreen mode

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.

Next: Tools to use

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more