Find: Missing Return Statement
Find the Mistake Beginner
Question
What is wrong with this component?
Code
function Header() {
<h1>Welcome</h1>;
}
Hint
Something is missing before the JSX.
Explanation
The component is missing the return keyword. Without return, the JSX is evaluated but not returned to React. The fix is: return <h1>Welcome</h1>;.
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.