Universal search across Courses, Lessons, Skills, Projects, Challenges, Competitions, Jobs, Internships, and Users
•
1
2
3
4
5
6
7
8
9
10
Components & State•Lesson 1
The React Mental Model & JSX Syntax
Instead of manually mutating the DOM with imperative commands (document.getElementById), React lets you declare what the UI should look like for a given state. JSX allows writing HTML-like markup directly inside JavaScript, which the compiler compiles into React.createElement() calls.
> **Key Takeaway:** React is a declarative library for building user interfaces by breaking screens into reusable components.
Python 3.11
•
Interactive Challenge
+50 XP
Challenge Objective
React is a declarative library for building user interfaces by breaking screens into reusable components.
solution.py
UTF-84 SpacesAuto-saved
cpython3.11:~/workspace
CPython 3.11.8 (WASM)
$python3 -u solution.py
Click "Compile & Run" (or press Ctrl + Enter) to compile AST, verify bytecode, and execute the solution.