React Core · 8 min read · Intermediate
Components, JSX & Props
Understand React's core mental model: UI = f(props, state), pure function components, and one-way data flow.
What you'll learn
- Write clean function components that return JSX
- Pass data from parent to child via destructured props
- Keep render functions pure with zero side effects
React treats your UI as a pure function of your data: UI = Component(props, state). Instead of manually hunting down DOM elements with document.querySelector, you declare what the UI should look like for the current state, and React efficiently updates the DOM.
Fill-in-the-Blank Exercise
Destructured Component Props
Destructure title and count from props and render them in JSX.
function Badge({ , count }) {
return <span className="pill">{title}: {}</span>;
}Live Component Playground
JSXLive React Component & Props (JSX)
Live React Preview
Check Your Understanding
Score: 0 / 1
1. How does data flow between parent and child components in React?
Study Workspace
Finished this lesson?
Your progress is saved locally in your browser, no account needed.