Jsx in react

JSX stands for JavaScript XML. It is a syntax extension that lets you write HTML-like markup inside JavaScript. It gets compiled to React.createElement calls. JSX makes UI code more readable and expressive by combining labels and logic in one place.

Example

const element = (
  <div className="card">
    <h2>{title}</h2>
    {isLoggedIn ? <p>Welcome</p> : <p>Guest</p>}
  </div>
);

JSX allows using curly braces to embed JavaScript expressions directly into the UI markup.