1.路由的安装:
$ npm install -S react-router |
2.引入路由文件
import {Router, Route, browserHistory} from 'react-router'; |
3.配置路由器
平级路由(做跳转用)
const router = ( |
嵌套路由(做嵌套)
const router = ( |
应用:
class App extends React.Component { |
2024-01-05 23:27:40
1.路由的安装:
$ npm install -S react-router |
2.引入路由文件
import {Router, Route, browserHistory} from 'react-router'; |
3.配置路由器
平级路由(做跳转用)
const router = ( |
嵌套路由(做嵌套)
const router = ( |
应用:
class App extends React.Component { |
下一篇:Qt之创建自定义类型