1. Component declaration
A React component is just a function — its capitalized name marks it as a component, not a plain helper.
function Greeting() {Typorithm · easy
Step 1 of 8 · intro card
Components & JSX
A React component is a function that returns JSX. JSX compiles down to React.createElement calls, and you compose components by rendering them like <Greeting />. Component names must be Capitalized so React treats them as components rather than HTML tags.
In React 19 the standard component is a plain function that returns JSX. Greeting() returns <h1>Hello, world</h1>, describing what should appear on screen.
JSX is not HTML — it is syntax sugar that compiles to React.createElement calls. Each tag becomes an element object that React uses to build and update the DOM.
Components compose: App renders <Greeting /> just like a built-in tag. The leading capital letter is what tells React it is a component, so names must always be Capitalized.
A component is a function returning JSX.
JSX compiles to React.createElement.
Component names must be Capitalized.
function Greeting() {
return <h1>Hello, world</h1>;
}
export default function App() {
return <Greeting />;
}Connect each part of the code to the concept before you type.
A React component is just a function — its capitalized name marks it as a component, not a plain helper.
function Greeting() {The function returns JSX, which compiles to React.createElement calls that describe the UI.
return <h1>Hello, world</h1>;App is the top-level component, exported so the app's entry point can render it.
export default function App() {Writing <Greeting /> renders the Greeting component — components compose by including each other in JSX.
return <Greeting />;Read the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.