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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs