在 react-router v3 我可以访问它props.location.query.foo(如果当前位置是?foo=bar)
中react-router-dom@4.0.0 props.location只有props.location.searchwith 是一个字符串,如?foo=bar&other=thing.
也许我需要手动解析和解构该字符串以找到fooor的值other。
截图console.log(this.props):(
注意?artist=band我想从这里获取值artist的值band)