嵌套路由,如何控制 {NavBase} 在 {RestAPIBase} 中渲染的位置
const RestAPIBaseChild = ({ match }) => (
<div>
<Route path="/" component={RestAPIBase}/>
<Route path={match.url + '/NavBase'} component={NavBase}/>
</div>
);
return (
<Router>
<div>
<Route path="/app" component={App}/>
<Route path="/parent" component={Parent}/>
<Route path="/abc" component={Parentdemo} />
<Route path="/navbase" component={NavBase} />
<Route path="/post" component={RestAPIBaseChild} />
</div>
</Router>
)