🚀 LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Exercises.
🎓 COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.

Project 14: Newsletter Form

React Engineer
Step 1 of 3
Project

Reading a Dynamic Route Param

Inside a component rendered at "/newsletter/:source", call const { source } = useParams() and display it. useParams reads whatever matched the :source segment of the URL — useful here for knowing which page a subscriber signed up from.

🎯 Your Task

Please add the exact code shown in the light gray box below to your editor.Do not delete your previous code, just insert these new lines in the correct place!

import { useParams } from "react-router-dom";

export default function NewsletterForm() {
  const { source } = useParams();

  return (
    <div>
      <h1>Subscribe</h1>
      <p>Signing up from: {source}</p>
    </div>
  );
}