react-router 路由匹配

来源:互联网 发布:崔恺 知乎 编辑:程序博客网 时间:2024/05/18 02:30

<Route path="/listrepo" component={ListRepo}/>      URL 类型 http://localhost:8080/#/listrepo?name=555&id=66666    值存在this.props.location.query中

<Route path="/listrepo/:name/:id" component={ListRepo}/>   url类型 http://localhost:8080/#/listrepo/555/66666      值存在this.props.params中