import React, { Component } from 'react';
import Child from './components/Child'
import {BrowserRouter as Router,Route,Link,Switch,NavLink,Redirect} from 'react-router-dom'
// 导入子组件
class App extends Component {
render() {
return (
首页 |
关于 |
产品1 |
产品abc
|
详情
);
}
}
function Home(){
return (我是首页
);
}
function About({history}){
return (我是关于
);
}
function Produce({match}){
return (我是产品:{match.params.id}
);
}
function NoMatch({location}){
return (页面没有找到{location.pathname}
);
}
function Detail({location,match}){
return ();
}
function Arg(){
return (我是Arg
);
}
function Com(){
return (我是com
);
}
export default App;