react项目中使用react-router-dom

React

2020-04-07

9

0

1. 安装react-router-dom

npm install react-router-dom -S

2. 新建router.js

import React from 'react'
import {
  HashRouter, Route, Switch, hashHistory, Redirect
} from 'react-router-dom'
import App from './App'
import Login from './views/Login/Login'
import List from './List/List'
import Detail from './Detail/Detail'


const BasicRoute = () => (
  
    
      
      
      
            
      
    
  
);

export default BasicRoute

 

 

 

 

 

发表评论

全部评论:0条

lmy233

努力工作学习生活的人呐~~

联系方式

神圣之子仅供学习交流
E-mail:limengyu233@163.com
github:https://github.com/lmy01