JSX (JavaScript XML) is a syntax extension for JavaScript that allows you to write HTML-like code within JavaScript. It makes React components more readable and easier to write.
JSX gets transpiled to React.createElement()
calls by tools like Babel:
// JSX
const element = <h1>Hello, World!</h1>;
// Transpiled to
const element = React.createElement('h1', null, 'Hello, World!');
Benefits of JSX:
React.createElement()