【发布时间】:2019-03-11 05:07:17
【问题描述】:
我有一个链接<Link to = "country/USA"/>
然后路由<Route path="country/:countryId" component={Country}/>
当渲染组件“Country”时,浏览器Url为
http://<domain>/country/USA
有没有办法将浏览器Url的显示更改为http://<domain>/country,并且只有“countryId”作为Country组件中的Route props。
经历过
https://reacttraining.com/react-router/web/api/BrowserRouter https://github.com/ReactTraining/react-router
找不到任何有用的东西。
有什么建议吗?
谢谢!
【问题讨论】:
标签: react-router