Mastery Points
0
Active Mission

Mission: Identify how JSX works under the hood to complete the lab.

Objective: add N/A to the code

Current MissionIN PROGRESS

Riddle:Mission: Identify how JSX works under the hood to complete the lab.

33%
Reward: 40 XP Verified

JSX (JavaScript XML) in react

Context & Logic

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.

Test Your Knowledge

Assessment Mode
1JSX is converted into which React function call?