1<BrowserRouter>
2 /* Links */
3 {heroes.map(hero => (<Link to={'heroes/' + hero.id} />)}
4
5 /* Component */
6 <Route path="heroes/:id" component={Hero} />
7</BrowserRouter>
8
9class Hero extends Component {
10 render() {
11 return (
12 <div>
13 {this.props.match.params.id}
14 </div>
15 );
16 }
17}