react-router 路由
程序员文章站
2022-03-26 13:54:04
...
ReactDOM.render(
<Router history={hashHistory}>
<Route path="/" component={App}>
<IndexRoute component={Home}/>
<Route path="*" component={Home}/>
<Route path="/login" component={Login}/>
</Route>
</Router>,
document.getElementById('root'));
内层路由
<Router history={hashHistory}>
<Route path="/userc" component={UserC}/>
<Route path="/membersearch" component={MemberSearch} />
</Router>