A Router may have only one child element
生活随笔
收集整理的这篇文章主要介绍了
A Router may have only one child element
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
报错
代码如下:
export default class App extends Component {render(){return(<HashRouter><Route path='/index' component={index}></Route><Route path='/:id' component={mine}></Route></HashRouter>)} }解决:这里提示Router中只能有一个Route配置,删掉一个就可以了,如果想要配置多路由,用一个div把这两个Route包起来就好了
总结
以上是生活随笔为你收集整理的A Router may have only one child element的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 数组去重(包括es6)
- 下一篇: git处理换行符问题,webstorm设