React · Exercise 1 of 6Next
Beginner
Your first routes
The app has a router and a Home page. Add two more pages: About (path /about, heading <h1>About</h1>) and Contact (path /contact, heading <h1>Contact</h1>).
Add links to them in the <nav> using React Router's Link (not a plain <a>), so clicking them changes the page without a reload. The address bar at the top must show the current path.
What Check tests
- The app starts on the Home page
- There are links to
/aboutand/contact - Clicking About shows the About page and
/aboutin the address bar - Clicking Contact shows the Contact page
- Clicking Home goes back to the Home page
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.