Predict Component Composition
Predict Output Easy
Question
What text appears in the browser?
Code
function Header({ title }) {
return <h1>{title}</h1>;
}
function App() {
return <Header title="My App" />;
}
Hint
App passes 'My App' as the title prop to Header.
Explanation
App renders Header with title="My App". Header renders an <h1> with that title. The browser shows "My App" inside an h1 heading.
Related Resources
Related Lessons
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.