您的位置:首页 > Web前端 > React

react-router 路由

2017-08-02 09:58 351 查看
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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  react