<ul className="nav">
<li>
<Link to="/section1">test1</Link>
</li>
<li>
<Link to="/section2">test2</Link>
</li>
<li>
<Link to="/section3">test3</Link>
</li>
//
////////////////////////////////////////
//
{list.map((item, index) => {
return <li key={index}>
<Router>
<Link to={`/section${index + 1}`}>{item}</Link>
</Router>
</li>
})}
</ul>
{this.props.children}
<Switch>
<Route path="/section1" component={Section1}/>1
<Route path="/section2" component={Section2}/>2
<Route path="/section3" component={Section3}/>3
</Switch>