React Tutorial #3: JSX — Writing HTML in JavaScript

In the previous tutorial, you created your first React app. Now let’s understand JSX — the special syntax that looks like HTML but is actually JavaScript. What is JSX? JSX stands for JavaScript XML. It is a syntax extension that lets you write HTML-like code inside your JavaScript (or TypeScript) files. Here is JSX: const element = <h1>Hello, world!</h1>; This looks like HTML, but it is not. It is JSX. Your browser does not understand JSX directly. Vite (via Babel/ESBuild) compiles it to regular JavaScript before the browser sees it. ...

July 26, 2026 · 5 min