Find: Missing Catch-All Route
Find the Mistake Easy
Question
What is wrong with this route setup?
Code
<Routes>
<Route path="/" element={<Home />} />
<Route path="/about" element={<About />} />
</Routes>
// User navigates to /contact
Hint
What happens when no route matches the URL?
Explanation
There's no catch-all route for unmatched URLs. When the user navigates to /contact, React Router renders nothing (blank page). The fix is to add: <Route path="*" element={<NotFound />} /> as the last route.
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.