![f63e091a46403b6256fac4152ae13664.png](https://i-blog.csdnimg.cn/blog_migrate/e60cde591d726683d31d40c9a05fa9ed.jpeg)
一.第三版
1.Router3.x
01.安装:
npm install --save react-router@3.x
02.引入
import { Router,Route,hashHistory } from "react-router";
<Router history={ hashHistory }>
<Route path="/home" component={ Home }></Route>
<Route path="/mine" component={ Mine }></Route>
</Router>
03.增加跳转连接
import { Link } from "react-router"
<ul>
<li>
<Link to="/home">主页面</Link>
</li>
<li>
<Link to="/mine">我的</Link>
</li>
</ul>
04.路由嵌套
1.在对应的路由里嵌套结构
<Route path="/mine" component={ Mine }>