1var links = [
2 { endpoint: '/america' },
3 { endpoint: '/canada' },
4 { endpoint: '/norway' },
5 { endpoint: '/bahamas' }
6];
7
8class Navigation extends React.Component {
9 render() {
10 const listItems = links.map((link) =>
11 <li key={link.endpoint}>{link.endpoint}</li>
12 );
13 return (
14 <div className="navigation">
15 <ul>
16 {listItems}
17 </ul>
18 </div>
19 );
20}
21