/* Links */
{heroes.map(hero => (<Link to={'heroes/' + hero.id} />)}
<Router>
/* Component */
<Route path="heroes/:id" component={Hero} />
</Router>
import { useParams } from "react-router-dom";
const Hero = () => {
const params = useParams();
// params.id => dynamic value defined as id in route
// e.g '/heroes/1234' -> params.id equals 1234
return (...)
}