0514 react路由

const BasicRoute = (props) => (
  <HashRouter>
      <Switch>
          <Route  path="/" component={BottomPage}/>
          <Route  path="/bottom/" component={BottomPage}/>
          <Route exact path="/article" component={Article} />
      </Switch>
  
  </HashRouter>
);

这样  #/Article链接访问不了,去掉 

 <Route  path="/" component={BottomPage}/> 就可以了
posted @ 2021-05-14 16:36  cnchengv  阅读(35)  评论(0编辑  收藏  举报