1. match通過路徑
<Route path="/path/:name" component={example} />
路由組件內獲取參數使用
this.props.match.params.name
2. query String 通過search
//mirrorx中使用push的參數search,link中使用與此類似 actions.routing.push({ pathname: '/path/example', search: `?name=${name}`, } )
路由組件內獲取參數使用
this.props.location.search
是個字符串,可以使用querySrirng方法來獲取指定參數
原來this.props.location.query.name這種方式在v4版本中不再可用,
老版本獲取參數方式
